If you have already run a Windows Forms or ASP.NET application, you might notice that Lookup Property Editors, which display reference properties, contain a list of existing objects of the specified type in the drop-down menu. Similarly, the Link Action's pop-up window displays a list of available objects of the specified type. The following image demonstrates both the Lookup Property Editor's drop-down window and the Link Action's pop-up window:
如果已运行 Windows 窗体或ASP.NET应用程序,您可能会注意到显示引用属性的查找属性编辑器包含下拉菜单中指定类型的现有对象的列表。同样,链接操作的弹出窗口显示指定类型的可用对象的列表。下图演示了查找属性编辑器的下拉窗口和链接操作的弹出窗口:
However, this approach to simultaneously show all objects, is not appropriate when there are many objects to be shown. So, the eXpressApp Framework supplies a built-in Search functionality. This topic details how to turn it on.
但是,当有许多对象要显示时,此方法同时显示所有对象是不适当的。因此,eXpressApp框架提供了一个内置的搜索功能。本主题详细介绍了如何打开它。
The Search functionality is activated in all Mobile applications and in WinForms and ASP.NET applications when a List View in a Lookup Property Editor or Link Action's pop-up window contains more than 25 objects by default. You can change this number. For this purpose, use the IModelOptions.LookupSmallCollectionItemCount property of the Application Model's Options node.
默认情况下,当"查找属性编辑器"或"链接操作"弹出窗口中的列表视图包含超过 25 个对象时,在所有移动应用程序中以及 WinForms 和 winForms 中激活搜索功能,并在 WinForms 和ASP.NET应用程序中激活搜索功能。您可以更改此号码。为此,请使用应用程序模型选项节点的 IModelOptions.查找小型集合项目计数属性。
This property specifies the minimum count of objects that should be in a List View to activate the Search functionality.
此属性指定列表视图中应具有激活搜索功能的对象的最小计数。
The Search functionality is provided by an editor and the Search button:
"搜索"功能由编辑器和"搜索"按钮提供:
This button executes the FilterController.FullTextFilterAction Action of the FilterController. This Action filters the List View's collection source, searching the objects whose properties' string representation includes the value specified by an end-user. The properties include those that are listed in the Views | <ListView> node defining the List View - no matter visible or invisible, persistent or non-persistent. For details, refer to the FilterController class description.
此按钮执行筛选器控制器.筛选控制器的全文筛选操作。此操作筛选列表视图的集合源,搜索其属性的字符串表示形式包括最终用户指定的值的对象。属性包括视图 |<ListView>定义列表视图的节点 - 无论是可见的还是不可见的、持久的还是非持久性的。有关详细信息,请参阅筛选器控制器类说明。
You can have the Search functionality available in the Lookup Property Editor or Link Action's pop-up window when any number of objects are contained in the List View's collection source. For this purpose, apply the LookupEditorModeAttribute to the required property (a reference of collection property). Using this attribute, you can set one of the following modes for the corresponding Lookup Property Editor or Link Action's pop-up window:
-
Auto
The Search feature is added if the presumed object count in its data source collection is greater than the value of the LookupSmallCollectionItemCount attribute.
-
AllItems
All objects of the specified type are loaded.
-
Search
None of the existing objects of the specified type are loaded, and the Search feature is available.
-
AllItemsWithSearch
All objects of the specified type are loaded, and the Search feature is available.
当列表视图的集合源中包含任意数量的对象时,您可以在"查找属性编辑器"或"链接操作"的弹出窗口中提供搜索功能。为此,将查找编辑器Mode属性应用于所需的属性(集合属性的引用)。使用此属性,可以为相应的查找属性编辑器或链接操作的弹出窗口设置以下模式之一:
- 自动
如果其数据源集合中的假定对象计数大于"查找小集合ItemCount"属性的值,则添加搜索功能。 - 所有项目
将加载指定类型的所有对象。 - 搜索
未加载指定类型的任何现有对象,并且搜索功能可用。 - 带搜索的所有项目
将加载指定类型的所有对象,并且搜索功能可用。
To set the required mode, pass the corresponding value as the LookupEditorModeAttribute's parameter. Alternatively, you can use the Model Editor. The value of the LookupEditorMode atribute's mode parameter is set for the LookupEditorMode property of the BOModel | <Class> | OwnMembers | <Member> node.
要设置所需的模式,将相应的值传递为查找编辑器模式属性的参数。或者,您可以使用模型编辑器。为 BOModel 的"查找编辑器模式"属性设置"查找编辑器模式"模式参数的值 |<Class>*自己的会员 |<Member>节点。
If the LookupEditorModeAttribute attribute is not used, the Lookup Property Editor is displayed in the Auto mode.
如果未使用"查找编辑器"属性,则"查找属性编辑器"在"自动"模式下显示。