Completed
Last Updated: 13 Oct 2015 06:56 by ADMIN
ADMIN
Dimitar
Created on: 27 May 2015 08:33
Category: GridView
Type: Bug Report
0
FIX. RadGridView - the filter cell is loosing the focus when there is a value in the search row and the user types in the filter cell.
To reproduce:
- Enter a value in the search row (make sure you will have several results)
- Enter a letter in the filtering row. The filetring row will lose the focus.

Workaround:
public class MyGridViewSearchRowInfo : GridViewSearchRowInfo
{
    public MyGridViewSearchRowInfo(GridViewInfo viewInfo) : base(viewInfo)
    {
    }

    public override void SelectNextSearchResult()
    {
        GridViewSystemRowInfo systemRow = this.ViewTemplate.MasterTemplate.CurrentRow as GridViewSystemRowInfo;

        if (systemRow != null && this.ViewTemplate.MasterTemplate.Owner.EditorManager.IsInEditMode)
        {
            return;
        }
        base.SelectNextSearchResult();
    }
}

//change the default row like this
void radGridView1_CreateRowInfo(object sender, GridViewCreateRowInfoEventArgs e)
{
    if (e.RowInfo is GridViewSearchRowInfo)
    {
        e.RowInfo = new MyGridViewSearchRowInfo(e.ViewInfo);
    }
}

0 comments