Description:
How can I set a databound column to display a text equivalent for a number?
For instance I have a bound column called "status" that returns an int (0, 1, 2) and I want the column to display (open, complete, ready to complete), respectively.
Answer:
Please use the LookUp or the ImageComboBox editor to display representations for values.
The LookUp editor obtains list items from the specified data source. You can bind it either to a data table with values or to a local collection object. Please examine the ModuleLookUpEdit in the EditorsTutorials project shipped with XtraEditors.
Unlike the LookUp editor, ImageComboBoxEdit items are not data-bound. Additionally, ImageComboBoxEdit can display icons. You can populate the Items collection with the descriptions and images at design- or runtime. Please review the ModuleImageComboBoxEdit in the EditorsTutorials demo project.
See Also:
How to specify whether or not to display the description associated with an image in the ImageComboBox
How do I create a lookup list to display values from a secondary data table, which match the ID values in my main table?
How to put an image in a grid cell
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.