TreeListLookUpEdit Class
The data-aware editor that implements lookup functionality using a dropdown TreeList control. This editor cannot operate if no data source is connected to it.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraTreeList.v24.1.dll
NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList
Declaration
Related API Members
The following members return TreeListLookUpEdit objects:
Remarks
A lookup editor is an editor with an embedded dropdown window that displays lookup records (the records from which an end user can select). When a lookup record is selected, the editor’s value (the BaseEdit.EditValue bindable property) and display text are modified accordingly.
The TreeListLookUpEdit
displays lookup records in the dropdown using the feature-rich TreeList control.
Important
The TreeList control embedded in the TreeListLookUpEdit
does not support unbound mode.
To learn how to set up lookup editors in different binding modes, see the following topics:
You may want to filter the popup data source of one (secondary) lookup editor based on a value of another (primary) lookup editor. This scenario is described in the following topic:
Additional Customization
The following list shows some of the members that help you additionally customize the TreeListLookUpEdit control.
RepositoryItemTreeListLookUpEdit.TreeList - Gets or sets a TreeList associated with the current TreeListLookUpEdit control.
When you create a TreeListLookUpEdit control, the RepositoryItemTreeListLookUpEdit.TreeList property is automatically initialized with an instance of the TreeList class. Use this property for treelist customization - specify service key fields (TreeList.KeyFieldName, TreeList.ParentFieldName) that form the data hierarchy, add columns (bound and unbound), add bands, create summaries, etc.
At design time, you can use the Tree List designer to customize the TreeList control. This designer can be invoked from the RepositoryItemTreeListLookUpEdit.TreeList property in the Visual Studio Properties window and from the TreeListLookUpEdit control’s smart tag.
RepositoryItemLookUpEditBase.DataSource property - Allows you to assign a data source to the lookup editor.
- RepositoryItemLookUpEditBase.TextEditStyle property - Enables the text editing feature in the edit box.
- RepositoryItemTreeListLookUpEdit.AutoComplete - Gets or sets whether the editor predicts the value that the user is typing and automatically applies that value. The property is in effect when text editing is enabled in the edit box (TextEditStyle is set to Standard).
- RepositoryItemTreeListLookUpEdit.AutoExpandAllNodes - Gets or sets whether all nodes are automatically expanded when the Tree List is being loaded.
- RepositoryItemTreeListLookUpEdit.PopupFilterMode - Gets or sets how records in the dropdown window are filtered when typing text within the edit box.
- RepositoryItemLookUpEditBase.ProcessNewValue event - Enables you to add a new record to the lookup data source (RepositoryItemLookUpEditBase.DataSource) for new values entered in the edit box.
- RepositoryItemLookUpEditBase.BestFitMode - Gets or sets the “best-fit” mode for columns in the dropdown window.
- RepositoryItem.NullText - Gets or sets the text that is displayed when the editor’s value is null.
To embed a TreeListLookUpEdit in a cell within a container control (XtraGrid, XtraTreeList, etc.), use the RepositoryItemTreeListLookUpEdit component. See the Editors and Simple Controls topic for more information.