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

Reconstruct FilterExpression from existing FilterColumns

1 Answer 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 05 Dec 2008, 02:38 PM
My scenerio:
User has entered some filter in columns 1 and 2.
The app has an ItemCommand that is intended to add additional filters.

Is there a way to get the constructed FilterExpression for specified columns so I append my own filterexpression?
If I simply append with existing item, the next time the button is clicked it retains the original filter value.
I only need to append the filter to the filterexpression that is on the columns user has entered.

RadGrid1.MasterTableView.FilterExpression = "((" + RadGrid1.MasterTableView.FilterExpression + ") AND ([myfilterfield] = 'xyz')) "

I've reviewed this, is the filterpair accessible for each filtercolumn?    Any better approach than manually reconstruct each filterpair for FilterExpression?



http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 08 Dec 2008, 02:25 PM
Hi Lenny,

You can basically manually construct and alter the filter expression. The following example shows one similar implementation.
I hope this gets you started properly.

All the best,
Yavor
the Telerik team

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