read the values of the expression column

3 posts, 1 answers
  1. Tamas
    Tamas avatar
    33 posts
    Member since:
    Jun 2010

    Posted 03 Oct 2011 Link to this post

    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. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 06 Oct 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Tamas
    Tamas avatar
    33 posts
    Member since:
    Jun 2010

    Posted 06 Oct 2011 Link to this post

    Thanks Maya! Have a nice day.
Back to Top