GridViewComboBoxColumn and cell value

2 posts, 0 answers
  1. Jason Parrish
    Jason Parrish avatar
    87 posts
    Member since:
    Sep 2009

    Posted 14 Oct 2011 Link to this post

    When using the gridviewcomboboxcolumn, shouldn't the cell's value be set to the Value of the combobox and not the text?  

    here is the code I am using to add the items to the combobox.  It is always choosing the text of the combobox instead of the value.


    oCombobox = CType((CType(e.ActiveEditor, RadDropDownListEditor)).EditorElement, RadDropDownListEditorElement)
    oCombobox.Items.Add(New RadListDataItem("Boolean", GetType(Boolean).ToString))
    oCombobox.Items.Add(New RadListDataItem("Date", GetType(DateTime).ToString))
    oCombobox.Items.Add(New RadListDataItem("Numeric", GetType(Double).ToString))
    oCombobox.Items.Add(New RadListDataItem("Text", GetType(String).ToString))

    What am doing wrong?
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 19 Oct 2011 Link to this post

    Hello Jason,

    Thank you for writing.

    I was not able to reproduce the described behavior. When I pick an item from the dropdown list and close the editor, I get the value member of the RadListDataItem saved to the cell. I am attaching a sample project which demonstrates this. 

    I hope this helps.

    Regards,
    Nikolay
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top