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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBox different display values from selected values

Thread ID:





2115 Dec 17,2002 12:59 PM UTC Dec 17,2002 03:14 PM UTC WinForms 1
Tags: GridControl
Charles Carlin
Asked On December 17, 2002 12:59 PM UTC

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.

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon