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

Use RadFilterExpressionsCollection in Linq Where clause?

1 Answer 26 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 10 Nov 2013, 04:26 PM
I'm trying to use the RadFilter to get the expression tree so that I can use it in a Linq Where clause. 
In WPF, I can use the DataFilter control to do this:
(IQueryable<SomeModel>)theContext.SomeModel.Where(theDataFilter.FilterDescriptors);
Is it possible to do the same kind of thing with the RadFilter? In the ApplyExpressions event I can get the e.ExpressionRoot.Expressions property but I can't see a way to convert that to anything usable by Linq.

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 13 Nov 2013, 08:46 AM
Hello,

In order to implement the desired functionality you could download the Dynamic LINQ library which builds a predicate LINQ tree expression from a string representation and executes it. You could download it and get more information on the topic from the link below. Note that Telerik RadControls for ASP.NET AJAX are also using the library internally.

I have provided the same answer in the support thread that you have posted. Note that we recommend avoiding duplicate questions so we could improve our response time and quality of answers.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Filter
Asked by
Robert
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Share this question
or