Use RadFilterExpressionsCollection in Linq Where clause?

2 posts, 0 answers
  1. Robert
    Robert avatar
    8 posts
    Member since:
    Jan 2012

    Posted 10 Nov 2013 Link to this post

    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.

  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 13 Nov 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top