LookupEditorMode Enum
Specifies the mode of a business class property’s Lookup Property Editor.
Namespace: DevExpress.Persistent.Base
Assembly: DevExpress.ExpressApp.v26.1.dll
Declaration
Members
| Name | Description |
|---|---|
Auto
|
Specifies that XAF adds the Search feature to the Lookup Property Editor if the presumed object count in its data source collection is greater than a specified value. To specify the value, access the Options node and use the IModelOptions.LookupSmallCollectionItemCount property. The Search feature allows you to find and retrieve the required object. |
AllItems
|
Specifies that all objects of the specified type are loaded to the Lookup Property Editor’s data source. |
Search
|
Specifies that the Lookup Property Editor’s data source is empty, and the Search feature is available. This feature allows you to find and retrieve the required object. |
AllItemsWithSearch
|
Specifies that all objects of the specified type are loaded to the Lookup Property Editor’s data source, and the Search feature is available. This feature allows you to find the required object. |
Remarks
LookupEditorMode enumeration specifies several aspects of Lookup Property Editor behavior:
- Data loading mode
- Text search capabilities
- Editor UI type
Specify Lookup Property Editor Mode in the Model Editor
- IModelClass.DefaultLookupEditorMode
- Specifies the default mode for all Lookup Property Editors bound to reference properties of the current type (BOModel | <Class>).
- IModelCommonMemberViewItem.LookupEditorMode
- Specifies the mode of the current Lookup Property Editor (BOModel | <Class> | <Class>_DetailView | Items | <Item>).
Specify Lookup Property Editor Mode in Code
Apply the LookupEditorModeAttribute to a reference property to specify the editor mode:
File: SolutionName.Module/BusinessObjects/Employee.cs
using DevExpress.Persistent.Base;
namespace SolutionName.Module.BusinessObjects;
public class Employee : BaseObject {
// ...
[LookupEditorMode(LookupEditorMode.AllItemsWithSearch)]
public Department Department {
// ...
}
}
For more information about search capabilities in LookupPropertyEditor, its data retrieval modes and corresponding UI options, refer to the following topic: How to: Add Search Action to Lookup Property Editors and Link Pop-up Windows.