How to get ValueMember value of GridViewComboBoxColumn

2 posts, 0 answers
  1. Sneha
    Sneha avatar
    3 posts
    Member since:
    Sep 2016

    Posted 30 Jul 2019 Link to this post

    Hi,
    Is there anyway to retrieve the ValueMember value of GridViewComboBoxColumn in the CellEndEdit ? Thanks.
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3626 posts

    Posted 30 Jul 2019 Link to this post

    Hello, Sneha,   

    The GridViewComboBoxColumn.ValueMember property controls what field of the column's DataSource will be stored to the cell's Value. In the CellEndEdit event you have access to the data row/column from where you can extract the cell's value as follows:

    private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
    {
        var cellValue = e.Row.Cells[e.ColumnIndex].Value;
    }

    Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

    Thank you for your understanding.

    Regards,
    Dess | Tech Support Engineer, Sr.
    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.
Back to Top