You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common-features/data-binding/descriptors.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ position: 10
9
9
---
10
10
11
11
12
-
## Components with Descriptors
12
+
## Data Operation Descriptors
13
13
14
14
This article explains how to retrieve the applied filtering, searching, sorting, and grouping criteria in Blazor components. The article applies to components that support these features. The components that offer one or all of the functionalities are:
15
15
16
-
*[Components that [expose an `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping.
16
+
* Components that [expose an `OnRead` event]({%slug common-features-data-binding-onread%}#components-with-onread-event), excluding the [ListView]({%slug listview-overview%}), because the ListView doesn't support built-in filtering, searching, sorting, and grouping.
Use the component state property of the `OnStateChanged` event argument. For example:
47
+
### Through the Component State
48
+
49
+
Use the component state property of the `OnStateChanged` event argument. This approach is applicable for the Gantt, the Grid and the TreeList, because they expose the state feature. For example:
At the bottom of the article you will find full examples.
72
+
See full examples at the bottom of the article.
72
73
73
74
74
75
## Filtering
75
76
76
-
The filtering criteria for each filtered field is stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor`:
77
+
The filtering criteria for each filtered field are stored in an individual collection of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor`:
77
78
78
-
* If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast each `IFilterDescriptor` to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor).
79
+
* If the component is of type input or select, such as the AutoComplete, the ComboBox, the DropDownList, the MultiColumnComboBox, the MultiSelect, cast the first `IFilterDescriptor` from the collection to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor).
79
80
* Otherwise, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor).
80
81
81
82
### CompositeFilterDescriptor
82
83
83
84
The `CompositeFilterDescriptor` exposes:
84
85
85
-
*[`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`.
86
+
*[`FilterDescriptors`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_FilterDescriptors) property. This property represents another collection of `IFilterDescriptor`. To access the filtering criteria cast each `IFilterDescriptor` to a `FilterDescriptor`. When the Filter component gets groupable filtering, cast each `IFilterDescriptor` to another `CompositeFilterDescriptor`.
86
87
*[`LogicalOperator`](/blazor-ui/api/telerik.datasource.compositefilterdescriptor#Telerik_DataSource_CompositeFilterDescriptor_LogicalOperator) property. This property can be either `AND` or `OR`. This property represents the logical operator applied between the instances in the `FilterDescriptors` collection.
87
88
88
89
When the filtering is initiated, the `CompositeFilterDescriptor` properties get different values, depending on the filter mode:
@@ -97,7 +98,7 @@ When the filtering is initiated, the `CompositeFilterDescriptor` properties get
97
98
98
99
## Searching
99
100
100
-
The searching criteria are stored in an individual `IFilterDescriptor`. To access the filtering criteria, cast the `IFilterDescriptor`to `CompositeFilterDescriptor`. The `FilterDescriptors` property of the `CompositeFilterDescriptor` gets filter descriptor instances for all string fields. Each filter descriptor instance gets the user input as `Value`. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is OR.
101
+
The searching criteria in a Grid or TreeList are stored in an individual `IFilterDescriptor`. Cast it to [`CompositeFilterDescriptor`](#compositefilterdescriptor). The `CompositeFilterDescriptor` holds one child `FilterDescriptor`s for each searchable string column. Each `FilterDescriptor` has the same `Value`, which is the user search input. The value of the `LogicalOperator` property of the `CompositeFilterDescriptor` is `Or`.
101
102
102
103
103
104
## Sorting
@@ -112,9 +113,9 @@ The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui
112
113
Тhe grouping criteria for each group is stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor). The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class.
113
114
114
115
115
-
## Examples
116
+
## Example with OnRead Event Handler
116
117
117
-
#### Obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor in the OnRead Event Handler
118
+
You can obtain the FilterDescriptor, SortDescriptor, GroupDescriptor in the `OnRead` event handler.
118
119
119
120
````CSHTML
120
121
@using Telerik.DataSource
@@ -204,7 +205,9 @@ The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui
204
205
}
205
206
````
206
207
207
-
#### Obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor Through the Component State
208
+
## Example with Component State
209
+
210
+
You can obtain the FilterDescriptor, SearchFilter, SortDescriptor, GroupDescriptor through the component state.
Copy file name to clipboardExpand all lines: components/autocomplete/events.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,15 +116,15 @@ from model: @Role
116
116
117
117
## OnRead
118
118
119
-
You can use the he [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug autocomplete-virtualization%})). The event fires when:
119
+
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug autocomplete-virtualization%})). The event fires when:
120
120
121
-
*the component initializes
122
-
*the user [filters]({%slug autocomplete-filter%})
123
-
*the user scrolls with [virtualization]({%slug autocomplete-virtualization%}) enabled
121
+
*The component initializes.
122
+
*The user [filters]({%slug autocomplete-filter%}).
123
+
*The user scrolls with [virtualization]({%slug autocomplete-virtualization%}) enabled.
124
124
125
125
You can also call remote data through async operations.
126
126
127
-
Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}).
127
+
Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}).
128
128
129
129
When using `OnRead`, make sure to set `TItem` and `TValue`.
Copy file name to clipboardExpand all lines: components/combobox/events.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,13 +177,13 @@ See the [ComboBox Overview - Selected Item]({%slug components/combobox/overview%
177
177
178
178
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug combobox-virtualization%})). The event fires when:
179
179
180
-
*the component initializes
181
-
*the user [filters]({%slug components/combobox/filter%})
182
-
*the user scrolls with [virtualization]({%slug combobox-virtualization%}) enabled
180
+
*The component initializes.
181
+
*The user [filters]({%slug components/combobox/filter%}).
182
+
*The user scrolls with [virtualization]({%slug combobox-virtualization%}) enabled.
183
183
184
184
You can also call remote data through `async` operations.
185
185
186
-
Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}).
186
+
Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}).
187
187
188
188
When using `OnRead`, make sure to set `TItem` and `TValue`.
Copy file name to clipboardExpand all lines: components/dropdownlist/events.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,11 +101,11 @@ from the model: @MySelectedItem
101
101
102
102
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug dropdownlist-virtualization%})). The event fires when:
103
103
104
-
*the component initializes
105
-
*the user [filters]({%slug components/dropdownlist/filter%})
106
-
*the user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled.
104
+
*The component initializes.
105
+
*The user [filters]({%slug components/dropdownlist/filter%}).
106
+
*The user scrolls with [virtualization]({%slug dropdownlist-virtualization%}) enabled.
107
107
108
-
Find out how to [get the applied by the user filtering and grouping criteria]({%slug common-features-descriptors%}).
108
+
Find out how to [get the applied filtering and grouping criteria]({%slug common-features-descriptors%}).
109
109
110
110
You can also call remote data through `async` operations.
Copy file name to clipboardExpand all lines: components/gantt/gantt-tree/filter/overview.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,11 @@ You can filter more than one column at a time, and all filter rules will be appl
26
26
27
27
## Filter Descriptors
28
28
29
-
The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering).
29
+
You can get the applied filtering criteria for each filtered field. Use the [Gantt state]({%slug gantt-state%}) to obtain the user input, the filter operator and other filtering properties. Find out how in the [Data Operation Descriptors article]({%slug common-features-descriptors%}#filtering).
30
30
31
31
## Customize The Filter Editors
32
32
33
-
You can customize the editors rendered in the Gantt
34
-
by providing the `FilterEditorType` attribute, exposed on the `<GanttColumn>`. The `FilterEditorType` attribute accepts a member of the `GanttTreeListFilterEditorType` enum:
33
+
You can customize the editors rendered in the Gantt by providing the `FilterEditorType` attribute, exposed on the `<GanttColumn>`. The `FilterEditorType` attribute accepts a member of the `GanttTreeListFilterEditorType` enum:
35
34
36
35
| Field data type | GanttTreeListFilterEditorType enum members |
Copy file name to clipboardExpand all lines: components/gantt/state.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -564,7 +564,7 @@ Sometimes you may want to know what the user changed in the Gantt (e.g., when th
564
564
565
565
Find out what the user changed in the Gantt through the `PropertyName` of the `GanttStateEventArgs`. Override the user action by changing and then setting your desired state.
566
566
567
-
Find out how to [get the applied by the user filtering and sorting criteria]({%slug common-features-descriptors%}).
567
+
Find out how to [get the applied filtering and sorting criteria]({%slug common-features-descriptors%}).
568
568
569
569
>caption Know when the Gantt state changes, which parameter changes, and amend the change
Copy file name to clipboardExpand all lines: components/grid/filter/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ The filter menu can display a [list of checkboxes]({%slug grid-checklist-filter%
37
37
38
38
## Filter Descriptors
39
39
40
-
The filtering criteria for each filtered field are stored in an individual [`CompositeFilterDescriptor`]({%slug common-features-descriptors%}#filtering).
40
+
You can get the applied filtering criteria for each filtered field. Use the [Grid state]({%slug grid-state%}) or the [Grid `OnRead` event handler]({%slug grid-events%}#read-event) to obtain the user input, the filter operator and other filtering properties. Find out how in the [Data Operation Descriptors article]({%slug common-features-descriptors%}#filtering).
0 commit comments