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

RadExpressionEditor parsing functionality

4 Answers 75 Views
ExpressionEditor
This is a migrated thread and some comments may be shown as answers.
Nedeltcho
Top achievements
Rank 1
Nedeltcho asked on 13 Sep 2012, 08:00 AM
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

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 13 Sep 2012, 09:30 AM
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.

0
Maurizio
Top achievements
Rank 2
answered on 01 Mar 2019, 04:00 PM
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!
0
Vladimir Stoyanov
Telerik team
answered on 05 Mar 2019, 03:53 PM
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.
0
Maurizio
Top achievements
Rank 2
answered on 05 Mar 2019, 04:30 PM

Hello Vladimir,

thanks for your response and logging a feedback item.

Best regeards
Maurizio

 


Tags
ExpressionEditor
Asked by
Nedeltcho
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Maurizio
Top achievements
Rank 2
Vladimir Stoyanov
Telerik team
Share this question
or