Lookup Editors and Main Settings
- 5 minutes to read
The following lookup editors are provided by the DevExpress Windows Forms library. All of them have one descendant (LookUpEditBase), which means that they have several features in common.
LookUpEdit Control
LookUpEdit - The editor that provides lookup functionality using a lightweight grid in a drop-down window.
GridLookUpEdit Control
GridLookUpEdit - The editor that provides lookup functionality using a dropdown feature-rich Data Grid (GridControl). You can display lookup records in a tabular format, banded tabular format, or as tiles (which can be arranged in one or multiple columns/rows, rendered as a list or a Kanban board).
Grid View format:
Tile View format (List layout mode):
The use of the GridControl for the presentation of the lookup data source adds rich dropdown customization features and end-user capabilities, including, but not limited to the following:
- presenting lookup records in a tabular, list or tile format.;
- built-in filtering,
- summaries;
- conditional style formats,
- rich cell value formatting,
- embedding any editor from the DevExpress library into grid cells (and thus display images, check boxes, etc.)
SearchLookUpEdit
SearchLookUpEdit - The editor that provides lookup functionality using a dropdown feature-rich data grid (GridControl), and contains the built-in Find Panel, allowing end-users to quickly filter and locate dropdown records. You can display lookup records in a tabular format, banded tabular format, or as tiles (which can be arranged in one or multiple columns/rows, rendered as a list or a Kanban board).
Grid View format:
Tile View format (List layout mode):
TreeListLookUpEdit Control
TreeListLookUpEdit - The editor that provides lookup functionality using a dropdown TreeList control.
Main Settings
The following table shows the main properties used to set up lookup editors.
Common Properties
Property | Description |
---|---|
Gets or sets the editor’s value. Use this property in standalone mode to specify the lookup editor’s value. This property is bindable. | |
Gets or sets the source of data displayed in the dropdown window. | |
Gets or sets the field name whose values identify dropdown rows. Use this property in standard lookup binding mode. | |
Gets or sets the field whose values are displayed in the edit box. | |
Gets or sets a string that specifies a key field (or multiple key fields) used for business object identification (when a lookup editor is bound to a business object). | |
Gets or sets the style in which text is displayed and edited in the editor. This property allows you to enable the text editing feature in the lookup editor’s edit box, which is disabled by default. | |
Gets or sets the “best-fit” mode for columns in the dropdown window. | |
Gets or sets the text that presents the editor’s null value (null, System.DBNull.Value and RepositoryItemDateEdit.NullDate - for DateEdit). | |
Occurs when a new value entered into the edit box is validated. | |
Provides access to the collection of columns displayed in the dropdown window. | |
Creates columns for all fields available in the lookup data source (RepositoryItemLookUpEditBase.DataSource). | |
Occurs on retrieving values for fields not found in the RepositoryItemLookUpEditBase.DataSource. | |
Gets or sets the width of the dropdown window (in pixels). | |
Gets or sets the number of rows simultaneously displayed in the dropdown window. | |
Gets or sets the lookup editor whose value determines the filter criteria applied to the popup data source of the current lookup editor. | |
Gets or sets the name(s) of the foreign key field(s) by which the popup data source of the current lookup editor is filtered. | |
Gets or sets whether the popup window is displayed immediately after an end-user has typed a character in the edit box. |
LookUpEdit Specific Properties
Property | Description |
---|---|
RepositoryItemLookUpEdit.Columns | Provides access to the collection of columns displayed in the dropdown window. |
RepositoryItemLookUpEdit.PopulateColumns | Creates columns for all fields available in the lookup data source (RepositoryItemLookUpEditBase.DataSource). |
RepositoryItemLookUpEdit.GetNotInListValue | Occurs on retrieving values for fields not found in the RepositoryItemLookUpEditBase.DataSource. |
RepositoryItemLookUpEdit.PopupWidth | Gets or sets the width of the dropdown window (in pixels). |
RepositoryItemLookUpEdit.DropDownRows | Gets or sets the number of rows simultaneously displayed in the dropdown window. |
RepositoryItemLookUpEdit.AcceptEditorTextAsNewValue | Gets or sets whether a custom value (a value that is not present in the lookup data source) that is entered in the edit box is accepted by the editor (when the value is validated and editor loses focus). This property supports Combobox mode for the lookup editor. |
GridLookUpEdit Specific Properties
Property | Description |
---|---|
RepositoryItemGridLookUpEditBase.PopupViewType | Gets or sets the type of View used to represent data in the dropdown. |
RepositoryItemGridLookUpEditBase.PopupView | Gets or sets the View used to represent data in the dropdown. |
RepositoryItemGridLookUpEditBase.PopupFilterMode | Gets or sets how records in the dropdown window are filtered when typing text within the edit box. |
RepositoryItemGridLookUpEdit.AcceptEditorTextAsNewValue | Gets or sets whether a custom value (a value that is not present in the lookup data source) that is entered in the edit box is accepted by the editor (when the value is validated and editor loses focus). This property supports Combobox mode for the lookup editor. |
SearchLookUpEdit Specific Properties
Property | Description |
---|---|
RepositoryItemGridLookUpEditBase.PopupViewType | Gets or sets the type of View used to represent data in the dropdown. |
RepositoryItemGridLookUpEditBase.PopupView | Gets or sets the View used to represent data in the dropdown. |
RepositoryItemGridLookUpEditBase.PopupFilterMode | Gets or sets how records in the dropdown window are filtered when typing text within the edit box. |
RepositoryItemSearchLookUpEdit.PopupFindMode | Gets or sets whether data searching starts automatically, or should be started manually. |
RepositoryItemSearchLookUpEdit.ShowAddNewButton | Gets or sets whether the “Add New” button is displayed within the editor’s dropdown. |
RepositoryItemSearchLookUpEdit.ShowClearButton | Gets or sets whether the “Clear” button is displayed within the editor’s dropdown. |
TreeListLookUpEdit Specific Properties
Property | Description |
---|---|
RepositoryItemTreeListLookUpEdit.TreeList | Gets or sets a TreeList associated with the current TreeListLookUpEdit control. |
RepositoryItemTreeListLookUpEdit.AutoExpandAllNodes | Gets or sets whether all nodes are automatically expanded when the Tree List is being loaded. This is a dependency property. |
RepositoryItemTreeListLookUpEdit.AutoComplete | Gets or sets whether the automatic completion feature is enabled. |
RepositoryItemTreeListLookUpEdit.PopupFilterMode | Gets or sets how records in the dropdown window are filtered when typing text within the edit box. |