Combobox Cell With DataSource Question

I have a GridControl that has a column whose CellType is set to "ComboBox" and to which is bound a Collection of objects. i.e.: .ColStyles(COLINDEX).CellType = "ComboBox" .ColStyles(COLINDEX).DataSource = myCollection .ColStyles(COLINDEX).DisplayMember = "Name" .ColStyles(COLINDEX).ValueMember = "ID" .ColStyles(COLINDEX).ExclusiveChoiceList = True Now, when a user selects an item in a cell''s drop-down list, how can I get the object that the displayed text in the cell represents (i.e. something akin to a SelectedItem property)? Or is that not possible?

1 Reply

AD Administrator Syncfusion Team June 4, 2005 02:35 AM UTC

If you set the .ValueMember = Nothing, then the grid(row,Col).Cellvalue should return the object. You can see a sample for this some of teh comboxes you see in \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\CellTypes\ComboboxCells.

Loader.
Up arrow icon