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

Create an expression based on an existing ExpressionColumn

4 Answers 14 Views
ExpressionEditor
This is a migrated thread and some comments may be shown as answers.
YBOT
Top achievements
Rank 1
Veteran
YBOT asked on 06 Apr 2021, 11:27 AM

I have a RadGrid that is bound to a ObservableCollection<Customer>. Users can click the RadGrid rows and create an ExpressionColumn using ExpressionEditor. I set ExpressionEditor.Item like:

RadExpressionEditor expressionEditor = new RadExpressionEditor();
expressionEditor.Item = this.myRadGrid.SelectedItem;

 

Users can create an expression like 'Customer.BankBalance + 100' and it gets added to the RadGrid:

 

private GridViewExpressionColumn expressionColumn = new GridViewExpressionColumn();
 
this.expressionColumn.Expression = expressionEditor.Expression;
this.expressionColumn.Header = "Test";
if (!this.myRadGrid.Columns.Contains(this.expressionColumn))
{
     this.myRadGrid.Columns.Add(this.expressionColumn);
}

How can I now use the newly created "Test" expression column in another ExpressionColumn by repeating the process the user has just done? So they would select a row but the "Test" column is now available to use in the ExpressionEditor and they could do an expression like "Test + 100".

4 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Apr 2021, 10:15 AM

Hello Toby,

I am not sure that I understand your requirement. Can you send over runnable code snippets or a project that illustrates the exact setup and how, and when to user creates the column? Also, few pictures showing the current and expected result will be useful.

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
YBOT
Top achievements
Rank 1
Veteran
answered on 13 Apr 2021, 11:00 AM
How can I send you a demo project?
0
Martin Ivanov
Telerik team
answered on 14 Apr 2021, 09:39 AM

Hello Toby,

If you can send runnable code snippets that can be used to assemble a runnable project I can check them on my side. Otherwise, you can use the support ticketing system in order to submit a ticket from your telerik.com account. There you can attach a .zip file with the project.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
YBOT
Top achievements
Rank 1
Veteran
answered on 14 Apr 2021, 10:05 AM
Thanks, I will raise a support ticket and upload a zip file.
Tags
ExpressionEditor
Asked by
YBOT
Top achievements
Rank 1
Veteran
Answers by
Martin Ivanov
Telerik team
YBOT
Top achievements
Rank 1
Veteran
Share this question
or