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.
Unfortunately, activation email could not send to your email. Please try again.

ComboBox different display values from selected values

Thread ID:

Created:

Updated:

Platform:

Replies:

2115 Dec 17,2002 07:59 AM Dec 17,2002 10:14 AM Windows Forms 1
loading
Tags: GridControl
Charles Carlin
Asked On December 17, 2002 07:59 AM

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 10:14 AM

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.

CONFIRMATION

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.

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.

;