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

Take Filter and apply as LINQ .Where()

2 Answers 169 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Justin Hunter
Top achievements
Rank 1
Justin Hunter asked on 12 Sep 2013, 06:40 PM
Hey all,

I was wondering if there was the ability to intercept the Filtering event for the RadGrid and extract the filter and apply it as a Where(...) to a completely separate container. We require this as we have a map and we want the filtering of the grid to affect the aggregation colours of the map.

How difficult / possible is this?

2 Answers, 1 is accepted

Sort by
1
Accepted
Rossen Hristov
Telerik team
answered on 13 Sep 2013, 05:39 AM
Hello,

We have a public static class with extension methods called Telerik.Windows.Data.QueryableExtensions.

It has a Where extension method for an IQueryable instance which accepts a collection of FilterDescriptors and translates them to a Where LINQ clause on the the IQueryable and returns it:

public static IQueryable Where(this IQueryable source, IEnumerable<IFilterDescriptor> filterDescriptors)


There are a bunch of other methods there as well.

Regards,
Rossen Hristov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Justin Hunter
Top achievements
Rank 1
answered on 13 Sep 2013, 01:03 PM
Thanks so much. This is exactly what I needed. :)
Tags
GridView
Asked by
Justin Hunter
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Justin Hunter
Top achievements
Rank 1
Share this question
or