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

Filter with Equals Function

3 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Das
Top achievements
Rank 1
Das asked on 19 Jan 2009, 10:05 AM
Hi,
I am performing the filter operation in one of the columns of type number. I have set the validation function as "Equals". If I enter some alphabet then all the existing filter conditions are lost and the grid displays all the records. Is there any possibility to avoid this? Any suggestions are highly appreciated.

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 19 Jan 2009, 12:05 PM
Hi Das,

One option in this case would be to disallow alpha input. This can be done by using numeric/date input in the filter. They can be nested in a filter template.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Das
Top achievements
Rank 1
answered on 19 Jan 2009, 12:24 PM
Thanks Yavor. This I think does not work with RADGrid Classic version. I am using RAD Grid Calssic version.
0
Yavor
Telerik team
answered on 19 Jan 2009, 12:41 PM
Hello Das,

Indeed, this feature is only available for the controls build for asp.net ajax.
In your case, you can attach to the ItemCommand event handler, and both validate the user input for the filtering operation, and preserve the old filter expression, so that you can restore it in case there is any invalid input, instead of returning all the records in the grid.
I hope this suggestion helps.

Kind regards,
Yavor
the Telerik team

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