Skip to content

DevExpress-Examples/XAF_how-to-show-filter-dialog-before-listview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files to look at:

How to show filter dialog before showing ListView

Scenario:

When a user executes a navigation item that displays a large ListView, the application should display a popup window that allows you to define a filter for this ListView before loading records in it. This filter dialog should remember the user's choice and provide the capability to select one of the stored filters.

Steps to implement:

1. Create a ListView model extender - IModelListViewAdditionalCriteria - that adds the AdditionalCriteria property to the ListView model to store the filter selected by the user.

2. Implement the ViewFilterContainer class whose DetailView is used as a filter dialog.

3. Implement the ViewFilterObject class which is used to store filters.

4. Implement the ShowFilterDialogController which shows the filter dialog instead of displaying the ListView, and then shows the filtered ListView. To do this, subscribe to the ShowNavigationItemController.ShowNavigationItemAction.Execute event and replace the ListView from the e.ShowViewParameters.CreatedView property with the ViewFilterContainer DetailView. Then show the filtered ListView using the Window.SetView method.

5. Implement the NewViewFilterObjectController which sets the ObjectType property of the ViewFilterObject object created by the ViewFilterContainer.Filter lookup's New action.

Blazor:

We described Blazor specificites in the following Support Center ticket: How to show a filter dialog before showing a large ListView in Blazor.

 

See Also:
How to: Use Criteria Property Editors
How to: Extend the Application Model and Schema
ShowNavigationItemController Class
Dialog Controller


Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)