RadExpressionEditor parsing functionality

5 posts, 0 answers
  1. Nedeltcho
    Nedeltcho avatar
    3 posts
    Member since:
    Sep 2012

    Posted 13 Sep 2012 Link to this post

    Hello,

    we're using your RadExpression editor in our application. We create the expressions using the editor and then we save them. At a
    later stage we parse them using the editor again, but we would like to use the parsing functionality without a dependence on WPF.
    Is there anyway to do that with any of your products?


    public static List<T> Filter<T>(IList<T> items, string filter) where T : new()
            {
                var result = new List<T>();
     
                try
                {
                    var editor = new RadExpressionEditor();
                    editor.Item = new T();
                    Expression exprResult;
                    var isSuccess = editor.TryParse(filter, out exprResult);
     
                    if (isSuccess)
                    {
                        var expr1 = (Expression<Func<T, bool>>)exprResult;
                        var func = expr1.Compile();
                        result = items.Where(func).ToList();
                    }
                }
                catch (Exception)
                {
                    
                }
     
                return result;
            }
    regards,
    Ned Stoyanov
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 13 Sep 2012 Link to this post

    Hello Ned,

    Unfortunately you cannot parse functionality without a dependence on WPF. 

    Regards,
    Didie
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. Maurizio
    Maurizio avatar
    45 posts
    Member since:
    Jan 2012

    Posted 01 Mar Link to this post

    Any news on this? Is Expression parsing / evaluation possible without the ExpressionEditor control in current versions of Relerik WPF? It would make the expression editor a much more powerful tool!
  4. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    457 posts

    Posted 05 Mar Link to this post

    Hello Maurizio,

    I am afraid that it is not possible to use the parsing functionality without depending on the PresentationCore and PresentationFramework dlls. 

    That said, I have logged a feedback item for making it possible to use the expression parser functionality without the ExpressionEditor control: ExpressionEditor: Make it possible to use the expression parser functionality without a reference to the ExpressionEditor control. You can follow the feedback item in order to get notified for any developments. I have also updated your telerik points as a small gesture of gratitude for bringing this to our attention. 

    Regards,
    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. Maurizio
    Maurizio avatar
    45 posts
    Member since:
    Jan 2012

    Posted 05 Mar in reply to Vladimir Stoyanov Link to this post

    Hello Vladimir,

    thanks for your response and logging a feedback item.

    Best regeards
    Maurizio

     


Back to Top