Hi Telerik Team,
Does the evaluation of an expression in a column generates an Event? Or is there a way to intercept the evaluation process and
substitute/enhance with my own code?
The expressions that I need to use require data points that are not found in the dataset used in the GridView, so I need a way to
intercept the evaluation to swap string variables that are not in the dataset with the actual value found within the application or a different dataset.
Regards.
5 Answers, 1 is accepted
Thank you for writing.
The following article shows you can create a custom function that can be used in the expression: Customizing RadExpressionEditor.
Another approach would be to use the CellFomatting event and change the cells text: Formatting Cells.
Please let me know if there is something else I can help you with.
Dimitar
Telerik
Thanks, I did resolved the part of doing my own functions but the second part I have not been able to complete,
Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(path);
always return null, so my functions are not being recognized by the expression editor.
Thank you for writing back.
This code gets an embedded resource. In your case, you can load the file directly. For example:
RadExpressionEditorForm.ExpressionItemsList.LoadFromXML(@"..\..\ExpressionItemsListData.xml");
Let me know if I can assist you further.
Regards,
Dimitar
Telerik
Hi Dimitar, I was able to load my own XML file, but the side effect is that
the expression editor now only shows the 3 functions that I created, all the built in operators, functions, etc are gone.
Is there a way to add my functions without wiping out the built in definitions?
Thank you for writing back.
You need to add the description for the other functions as well. I have attached the complete file that you need to load.
I hope this will be useful.
Regards,
Dimitar
Telerik