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

GridViewComboBoxColumn and cell value

1 Answer 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jason Parrish
Top achievements
Rank 1
Jason Parrish asked on 14 Oct 2011, 09:34 PM
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?

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 19 Oct 2011, 06:14 PM
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.

Tags
GridView
Asked by
Jason Parrish
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or