We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ComboBox different display values from selected values

I wanted to know if there was a way to display a dropdown list that provided more details then what is selected. Example: The database field is a single char(1). The choices might be full string descriptions, I would like the dropdown to list the text but the bound column can only accept the char. So: A - Apples, O - Oranges in the dropdown but the bound column only stores A or O.

1 Reply

AD Administrator Syncfusion Team December 17, 2002 03:14 PM UTC

In addition to setting the CellType of the column to "ComboBox", you can also set the DataSource, DisplayMember and ValueMember of the column (or cell). So, if you have a datatable that has a column named ID and a column named Description, you can set the DataSource to the datatable, the DisplayMember to "Description" and the ValueMember to "ID". Then the combobox will display the descriptions, but will use the id as the value. Take a look at the GDBGcombos sample.

Live Chat Icon For mobile
Up arrow icon