Filter Data at Grid Control Level
- 3 minutes to read
You can filter a List View by means of the grid that displays it: XAF supports the following platform-specific grid controls:
- ASP.NET Core Blazor
- DxGrid
- Windows Forms
- GridControl
- ASP.NET Web Forms
- ASPxGridView
Tip
For information on how to customize a grid component displayed in a List View, refer to the following topic: How to: Access the Grid Component in a List View
Column Header Filters
This functionality is available in the following platform-specific controls:
- DxGrid in ASP.NET Core Blazor
- GridControl in Windows Forms
- ASPxGridView in ASP.NET Web Forms
- ASP.NET Core Blazor
- Windows Forms
Tip
If you use column header filters, XAF saves changes in the Application Model. Changes persist even if you close the View. You can access these filter settings via the IModelListView.Filter property in the Model Editor.
Filter Builder
This functionality is available for the following List Editors:
- ASP.NET Core Blazor
- DxGridListEditor
- Windows Forms
- GridListEditor
- ASP.NET Web Forms
- ASPxGridListEditor
- ASP.NET Core Blazor
- Windows Forms
Tip
If you use the Filter Builder, XAF saves changes in the Application Model. Changes persist even if you close the View. You can access these filter settings via the IModelListView.Filter property in the Model Editor.
The Filter Builder is available for properties that store filter criteria in ASP.NET Core Blazor, Windows Forms, and ASP.NET Web Forms XAF applications. For more information about platform-specific UI controls that implement the Filter Builder, refer to the following topic: Criteria Properties.
Useful Links
Filter Builder in ASP.NET Core Blazor
Filter Builder in Windows Forms
- Control which properties are available in a Filter Builder.
- Handle the FilterEditorCreated event to access the currently used Filter Control.
- Handle the CreateCustomFilterEditorRepositoryItem event to create a custom repository item in the Filter Builder.
- Handle the CustomizeFilterTreeNodeModelPropertyCaption event to customize a property caption when it appears in the Filter Builder.
Filter Builder in ASP.NET Web Forms
- Control whether the Filter Builder displays properties hierarchy.
- Control properties hierarchy depth in the Filter Builder.
- Handle the FilterControlColumnsCreated event to customize the filter control column collection.
Auto Filter Row
The Auto Filter Row functionality is available for the following List Editors:
- ASP.NET Core Blazor
- DxGridListEditor
- Windows Forms
- GridListEditor
- ASP.NET Web Forms
- ASPxGridListEditor
Tip
If you use the Auto Filter Row, XAF saves changes in the Application Model. Changes persist even if you close the View. You can access these filter settings via the IModelListView.Filter property in the Model Editor.
Useful Links
Use the ShowAutoFilterRow property to toggle Auto Filter Row visibility in the grid that displays the current List View.
Use the DefaultListViewShowAutoFilterRow property to toggle Auto Filter Row visibility in the default List View.
Find Panel or Search Panel
A search component that a List Editor displays at runtime. The following List Editors support this functionality:
- ASP.NET Core Blazor
- DxGridListEditor
- Windows Forms
- GridListEditor
- ASP.NET Web Forms
- ASPxGridListEditor
Tip
The filters applied in the search component are not saved in the the Application Model.
Useful Links
Use the ShowFindPanel property to control whether the List Editor displays a search component at runtime.
Use the DefaultListViewShowFindPanel property to specify the ShowFindPanel property’s default value.
Use ListViewFindPanelAttribute in a business class declaration to control whether a List View of this type displays a search component.