Filtering UI
The DataGrid supports filtering through the UI.
Filtering UI appears when clicking on the filtering icon on each column's header'.
The Filtering UI exposes the following properties:
UserFilterMode
—Defines whether the Filtering UI is enabled/disabled. The available options are Auto/Enabled/Disabled. The default value of the UserFilterMode is Auto. Set the property on DataGrid control.CanUserFilter
(bool
) property is used to enable/disable the filtering of a specific column. Set the property to a specific column.ShowDistinctValuesFilter
(bool
)—Defines whether the distinct values are included int he Filering UI. By default the value is true.FilterContentTemplate
(DataTemplate
)—Defines the content template of the DataGrid Columns Filter and overriding the default template.
Events related to DistinctValuesFilter:
-
DistinctValuesLoading
event—Occurs when loading the distinct values that will be displayed in theTelerik.Maui.Controls.Compatibility.DataGrid.DataGridDistinctValuesFilterView
. TheDistinctValuesLoading
event handler receives two parameters:- The sender argument, which is of type object, but can be cast to the
RadDataGrid
type. - A
DistinctValuesLoadingEventArgs
object, which provides the following properties:-
DistinctValues
— Is a property which specifies a list of values of typeIEnumerable
which are to be displayed in theDataGridDistinctValuesFilterView
. -
Column
— Is a readonly property of typeDataGridColumn
which gets the column for which the distinct values are being loaded.
-
- The sender argument, which is of type object, but can be cast to the