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

Filter not working with blank value

3 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff Nafe
Top achievements
Rank 1
Jeff Nafe asked on 16 Dec 2008, 04:16 PM
When I set a filter on a column, then attempt to "clear" it by deleting the current filter and hitting ENTER (we have it set up where ENTER kicks off the filtering), the filter reverts to it's previous value instead of resetting the filter and returning everything. This appears to be a new issue since we upgraded to Q3 2008.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 18 Dec 2008, 10:37 AM
Hi Jeff,

Can you replicate the same issue with the following example? Clearing the filter and choosing "Contains" option does not produce any other set of results - having no value entered will not trigger the filtering in this case.
Let me know if I am leaving something out.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jeff Nafe
Top achievements
Rank 1
answered on 18 Dec 2008, 01:19 PM
Yes, for the most part, this is what's happening with us. The only differences are:

1) we kick off our filtering via the user hitting ENTER from within the filter box
2) after clearing out the filter criteria and hitting ENTER, it doesn't filter AND the previous filter value is redisplayed in the filter box.

With previous DLLs, this "clearing" of the filter seemed to work. Both in my app and your example, entering a blank space in the filter criteria seems to get around this, but we don't want to have to do that.

Can this be fixed so that entering nothing in there actually resets the filter?

Thanks!
0
Yavor
Telerik team
answered on 18 Dec 2008, 01:31 PM
Hello Jeff,

This is the intended behavior of the control. The logic is that if the user has not entered any data, no filtering should take place, since filtering on an empty string will fetch no data. However, if you have a different requirement, you can use custom code to chieve it. For example, when the user presses enter, you can make an ajax request to the server. From the server, you can reset the filter expression for the control (RadGrid1.MasterTableView.FilterExpression=""), and rebind it, which would return all the data.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Jeff Nafe
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Jeff Nafe
Top achievements
Rank 1
Share this question
or