Xafari Lookup. Getting Started

Let's look at an example from the Xafari Northwind demo installed with Xafari. Product type exposes Category property, it is a reference property, it refers to the object of Category type. To display Category property via the XafariLookupEditor follow the steps described below.

In the platform-specific module project, invoke the Module Designer and add XafariWinModule and XafariEditorsWinModule to the Required Modules section.


Build project and invoke the Model Editor, navigate to the BO Model node, business class item and required member, set PropertyEditorType property to the "Xafari.Editors.Win.XafariLookupEditor" value.


Now you can build and run Win application and navigate to the Product Detail View. See the Category property. Xafari Lookup Editor shows the value and provides a drop-down list in the same manner as the standard LookupPropertyEditor from DevExpress.


XafariLookupEditor provides two additional buttons, which are highlighted below:


The first of them shows Detail View for the current referenced object.


The second button invokes a separate window with a list of available objects.


Thus, the editor can display three Views: List View for the drop-down window, Detail View for the current referenced object and separate List View with available objects. All of these Views are defined in the Application Model. You can navigate to the Views|Product_DetailView|Items|Category node and check ModalView, PopupView and PreviewView options.


  • ModalView specifies List View for xafari_lookup_property_editor_4 button.
  • PopupView specifies View for xafari_lookup_property_editor_5 button.
  • PreviewView specifies View for xafari_lookup_property_editor_6 button.

By default, ModalView takes value from the DefaultListView property of the refernced business class. PopupView and PreviewView behave similarly. Image below demonstrates this behavior.