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

read the values of the expression column

2 Answers 39 Views
ExpressionEditor
This is a migrated thread and some comments may be shown as answers.
Tamas
Top achievements
Rank 1
Tamas asked on 03 Oct 2011, 11:56 AM
Hi,

I'm using the expression editor and it works fine. However I'm looking for the simplest way to go through the contents of the expression column and read the calculated values of each cell as a string.

Can you please help me?

Thanks and best regards,
Tamas

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 06 Oct 2011, 07:56 AM
Hi Tamas,

You could use the GetValueForItem(DataItem item) method of the column. For example:

private void RadButton_Click_1(object sender, RoutedEventArgs e)
        {
            GridViewExpressionColumn expressionColumn = this.playersGrid.Columns[4] as GridViewExpressionColumn;
            foreach(Player player in this.playersGrid.Items)
            {
                var expressinValue = expressionColumn.GetValueForItem(player);
            }
        }

 

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tamas
Top achievements
Rank 1
answered on 06 Oct 2011, 09:44 AM
Thanks Maya! Have a nice day.
Tags
ExpressionEditor
Asked by
Tamas
Top achievements
Rank 1
Answers by
Maya
Telerik team
Tamas
Top achievements
Rank 1
Share this question
or