Skip to content

kashiash/XAF_how-to-search-for-objects-by-using-all-the-properties-or-by-using-more-complex-criteria-e1744

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files to look at:

How to search for objects by using all the properties or by using more complex criteria

This example provides a possible workaround for the Filtering - Support searching objects by a string through all the properties (or a set of properties) or by more complex criteria suggestion.
The Dennis.Search.Win module, shown in the example, provides API to create a non-persistent object that can be used to search by properties of a business class. Such a non-persistent search-object should implement the ISearchObject contract. By default, it's supported by the abstract and generic SearchObjectBase class in the module. Search-objects are shown in a Detail View with the help of the SearchObjectViewController. To compose a search criteria, a specific SearchObjectPropertyEditor is used (it contains the Search and Clear buttons).
An example use of the implemented module is illustrated in the WinSolution.Module.Win module. There is a ProductSearchObject class that is inherited from the base SearchObjectBase class. If necessary, you can create several search objects for one business class. In UI, all search objects will be listed in a drop-down list in the toolbar of a View of your business class. Download and run the attached example to see how this works in action.
(Take special note of the SearchObjectBase class implementation, because it asynchronously loads search results of a specific type from the data store into the Search Results nested List View.)

Note that if you are implementing this functionality in ASP.NET, it is necessary to set the WebApplication.CollectionsEditMode property to Edit. Otherwise, the search results will not be displayed.

 

See Also:
How to allow users to create filter via the criteria editor before previewing a report
How to use Criteria Property Editors


About

.NET, Frameworks (XAF & XPO), eXpressApp Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%