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

Custom Filtering

1 Answer 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 13 Jan 2015, 12:11 PM
I have a grid where I need to create custom filtering, but I am not sure exactly how or where to modify the MasterTableView.FilterExpression.

The grid has multiple columns - each of which can be filtered. The final column is a status column controlled by a DropDownList that is dependent on several of my object properties. I need to add one of the following to the filter expression: (Property1 == null), (Property2 == null) or (Property1 != null && Property2 != null). I can add the proper filtering text to the FilterExpression in response to the DropDownList's OnSelectedIndexChanged and the filtering works fine.However, when I change the filtering for one of the other columns, my custom filter expression is lost.

First, is there a way of setting just the additional filter expression to let the grid include it in the FilterExpression?

If not, what event should I be using to make sure the custom part of the filter expression is included when another column's filtering changes?

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 16 Jan 2015, 08:21 AM
Hi Richard,

I would recommend you to examine the following help article which elaborates more on replacing a filter expression. Keep in mind that each time you need to apply a new filter expression you have to modify the current one and not replace it. This way you will prevent losing of the current applied filter.


Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or