LookupEditorModeAttribute Class
Specifies the mode of the target business class property’s Lookup Property Editor.
Namespace: DevExpress.Persistent.Base
Assembly: DevExpress.ExpressApp.v26.1.dll
Declaration
Remarks
XAF uses Lookup Property Editors to display business class properties based on the BaseObject type. The drop-down frame of this Property Editor contains a List View that displays all existing objects of the specified type. To enable the Search function for a specific property, apply the LookupEditorMode attribute to this property’s declaration.
File: SolutionName.Module/BusinessObjects/Employee.cs
using DevExpress.Persistent.Base;
namespace SolutionName.Module.BusinessObjects;
public class Employee : BaseObject {
// ...
[LookupEditorMode(LookupEditorMode.AllItemsWithSearch)]
public Department Department {
// ...
}
}
To review all available attribute parameter values, refer to the following topic: LookupEditorModeAttribute.Mode.
You can also specify the editor mode in the Model Editor. First, locate the required node: BOModel | <Class> | OwnMembers | <Member>. Second, modify the following property: IModelCommonMemberViewItem.LookupEditorMode.
// ...
public class Contact : Person, IMapsMarker {
// ...
[LookupEditorMode(LookupEditorMode.AllItemsWithSearch)]
public Department Department {
// ...
}
}
See the attribute’s LookupEditorModeAttribute.Mode property description to learn about the available values you can pass as the mode parameter.
The value of the LookupEditorMode attribute’s mode parameter is set for the IModelCommonMemberViewItem.LookupEditorMode property of the Application Model‘s BOModel | <Class> | OwnMembers | <Member> node. You can set the required value for this property directly in the Application Model via the Model Editor.