How to: Add a Search Action to Lookup Property Editors and Link Pop-up how Windows: Add search button to find the property editor and link pop-up window

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:

If you have run Windows Forms or ASP.NET application, you may notice that the display attribute reference lookup property editor contains a list of existing objects of the type specified in the drop-down menu. Similarly, the link pop-up window displays a list of available operating objects of the specified type. The following illustration shows the Property Editor look for pop-ups and pull-down window operation link:

HowToAddSearchFunctionality

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.查找小型集合项目计数属性。

LookupSmallCollectionItemCount

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:

"搜索"功能由编辑器和"搜索"按钮提供:

SearchInLookup

SearchInLinkDialog

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.

If no "find Editor" attribute, "Find Attribute Editor" displayed in the "automatic" mode.

Guess you like

Origin www.cnblogs.com/foreachlife/p/How-to-Add-a-Search-Action-to-Lookup-Property-Editors-and-Link-Pop-up-Windows.html