Skip to content

Commit c6b287e

Browse files
committed
update after review
1 parent 718ae0d commit c6b287e

File tree

17 files changed

+48
-46
lines changed

17 files changed

+48
-46
lines changed

common-features/data-binding/descriptors.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ position: 10
99
---
1010

1111

12-
## Components with Descriptors
12+
## Data Operation Descriptors
1313

1414
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:
1515

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.
1717
* [Filter]({%slug filter-overview%})
1818
* [Gantt]({%slug gantt-overview%})
1919
* [TreeList]({%slug treelist-overview%})
@@ -44,8 +44,9 @@ async Task OnReadHandler(...ReadEventArgs args)
4444
}
4545
````
4646

47-
#### Through the Component State
48-
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:
4950

5051
````CS
5152
async Task OnStateChangedHandler(GridStateEventArgs<Product> args)
@@ -68,21 +69,21 @@ async Task OnStateChangedHandler(GridStateEventArgs<Product> args)
6869
}
6970
````
7071

71-
At the bottom of the article you will find full examples.
72+
See full examples at the bottom of the article.
7273

7374

7475
## Filtering
7576

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`:
7778

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).
7980
* Otherwise, cast each `IFilterDescriptor` to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor).
8081

8182
### CompositeFilterDescriptor
8283

8384
The `CompositeFilterDescriptor` exposes:
8485

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`.
8687
* [`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.
8788

8889
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
9798

9899
## Searching
99100

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`.
101102

102103

103104
## Sorting
@@ -112,9 +113,9 @@ The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui
112113
Т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.
113114

114115

115-
## Examples
116+
## Example with OnRead Event Handler
116117

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.
118119

119120
````CSHTML
120121
@using Telerik.DataSource
@@ -204,7 +205,9 @@ The sorting criteria are stored in a collection of [`SortDescriptor`](/blazor-ui
204205
}
205206
````
206207

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.
208211

209212
````CSHTML
210213
@using System.Text.Json

components/autocomplete/events.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ from model: @Role
116116

117117
## OnRead
118118

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:
120120

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.
124124

125125
You can also call remote data through async operations.
126126

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%}).
128128

129129
When using `OnRead`, make sure to set `TItem` and `TValue`.
130130

components/autocomplete/filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is
1616

1717
You can also use the [`OnRead` event]({%slug autocomplete-events%}#onread) to:
1818
* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event).
19-
* Implement custom (server) filtering and set a data source dynamically.
19+
* Implement custom (server) filtering and set data dynamically.
2020

2121
## Filter Operator
2222

components/combobox/events.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ See the [ComboBox Overview - Selected Item]({%slug components/combobox/overview%
177177

178178
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:
179179

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.
183183

184184
You can also call remote data through `async` operations.
185185

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%}).
187187

188188
When using `OnRead`, make sure to set `TItem` and `TValue`.
189189

components/combobox/filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is
1616

1717
You can also use the [`OnRead` event]({%slug components/combobox/events%}#onread) to:
1818
* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event).
19-
* Implement custom (server) filtering and set a data source dynamically.
19+
* Implement custom (server) filtering and set data dynamically.
2020

2121
Filtering looks in the `TextField`, and the filter is reset when the dropdown closes.
2222

components/dropdownlist/events.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ from the model: @MySelectedItem
101101

102102
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:
103103

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.
107107

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%}).
109109

110110
You can also call remote data through `async` operations.
111111

components/dropdownlist/filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To enable filtering, set the `Filterable` parameter to `true`. The filtering is
1616

1717
You can also use the [`OnRead` event]({%slug components/dropdownlist/events%}#onread) to:
1818
* Get the [applied filtering criteria]({%slug common-features-descriptors%}#through-the-onread-event).
19-
* Implement custom (server) filtering and set a data source dynamically.
19+
* Implement custom (server) filtering and set data dynamically.
2020

2121
Filtering looks in the `TextField`, and the filter is reset when the dropdown closes.
2222

components/gantt/gantt-tree/filter/overview.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ You can filter more than one column at a time, and all filter rules will be appl
2626

2727
## Filter Descriptors
2828

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).
3030

3131
## Customize The Filter Editors
3232

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:
3534

3635
| Field data type | GanttTreeListFilterEditorType enum members |
3736
|-----------------|------------------------------------------|

components/gantt/state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ Sometimes you may want to know what the user changed in the Gantt (e.g., when th
564564

565565
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.
566566

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%}).
568568

569569
>caption Know when the Gantt state changes, which parameter changes, and amend the change
570570

components/grid/filter/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The filter menu can display a [list of checkboxes]({%slug grid-checklist-filter%
3737

3838
## Filter Descriptors
3939

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).
4141

4242
## Custom Filtering
4343

0 commit comments

Comments
 (0)