Skip to content

DevExpress-Examples/winforms-lookupedit-bind-to-simple-data-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms LookupEdit - Standard Binding (Simple Data Types)

This example shows how to create and configure an in-place LookUpEdit control (RepositoryItemLookUpEdit) for editing cells in a grid column.

The lookup editor is used to edit the CategoryID field values from the Products list. The lookup editor displays corresponding category names in the edit box.

Use the following properties to bind the LookUpEdit control to data:

  • DataSource - Specifies the source of records.
  • DisplayMember - The data source field whose values are visible to users. A value from this field is displayed in the lookup’s text box when a user selects a record.
  • ValueMember - The data source field with unique/key values. A value from this data field is assigned to the lookup's EditValue property when a user selects a record. When a lookup editor is used to edit cell values in the Data Grid, the type of the ValueMember field must match the type of the field assigned to the grid's lookup column (GridColumn.FieldName). Enable the lookup's ThrowExceptionOnInvalidLookUpEditValueType option to detect data type issues.

Files to Review

Documentation

See Also

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)