This is a migrated thread and some comments may be shown as answers.

Filtering UX

2 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter Zolja
Top achievements
Rank 1
Peter Zolja asked on 28 May 2009, 01:54 AM
When filtering by column and using AutoPostBackOnFilter="true" after the postback the filter box is no longer selected, it lost focus. What's worse is that FilterDelay doesn't seem to do anything, or at least not what I would expect it to do, so after each character the client types a postback occurs and the focus to the filter box is lost. If it would at least wait for the client to stop typing and only after FilterDelay millisecond to do the postback it would be somewhat OK. The way it works now it's completely useless. Am I missing something? Thanks.

P.S. I'm using the Jan14 version.

2 Answers, 1 is accepted

Sort by
0
Peter Zolja
Top achievements
Rank 1
answered on 28 May 2009, 01:59 AM
It seems that setting AutoPostBackOnFilter to false still causes a postback but takes FilterDelay into consideration. To make it do what I want I would need it to refocus the filter after postback...
0
Tsvetoslav
Telerik team
answered on 30 May 2009, 11:57 AM
Hi Peter Zolja,

If you are using ajax, you have to employ the ScriptManager's SetFocus method. Otherwise, for regular post backs you can use the Page's SetFocus method. Here is the code for setting focus to a filter box in an ajaxified grid:

    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
    {  
        if (e.CommandName == "Filter")  
        {  
            box = ((GridFilteringItem)e.Item)[((Pair)e.CommandArgument).Second.ToString()].Controls[0] as TextBox;  
            if (box != null)  
                ScriptManager1.SetFocus(box.ClientID);  
        }  
    } 

I hope this helps.


Best Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Peter Zolja
Top achievements
Rank 1
Answers by
Peter Zolja
Top achievements
Rank 1
Tsvetoslav
Telerik team
Share this question
or