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

Clear column filter when using AutoPostBackOnFilter and CurrentFilterFunction

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 22 Aug 2011, 09:56 AM
Hi All.

I've hidden the filter icon for each column in the filter row in a RadGrid, and have configured some of the columns to use the "Contains" filter and to postback when I press the Return/Enter key when the filter textbox has focus. This is working really well.

Hide filter icon...
<style type="text/css">  
    .RadGrid .rgFilter,  
    .GridFilterRow_Gray img  
    {  
        display: none;  
    }  
</style>

Configure columns to filter using "Contains" when user presses Return/Enter key...
AutoPostBackOnFilter="true" 
CurrentFilterFunction="Contains"


However, when I want to clear the filter for a given column, I should to be able to simply clear the text in the textbox in the filter row and press the Return/Enter key again, but this doesn't work so well.

For instance, if I leave the focus in the filter textbox after I have applied a filter, delete the text and pess Return/Enter again, it's all a matter of luck if the filter clears and the grid displays all the data or not. Sometimes it does, sometimes it just sits there and doesn't do anything. This is also the case if I change the filter text (if I want to change the filter or make a mistake).

The only way I can guarantee (by guarantee, I mean it's worked everytime so far) to make the filter clear or change, is to move the focus to a different filter textbox and back again and make my changes.

Has anyone else experienced this or does anyone know why this is happening?

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Aug 2011, 11:30 AM
Hello Karl,

Please go through the forum thread below which elaborates on this matter and let me know if it helps:
http://www.telerik.com/community/forums/aspnet-ajax/grid/autopostbackonfilter-only-for-return-and-click.aspx

Regards,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Karl
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or