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
See the [complete example](#example-with-onread-event-handler) at the bottom of the article.
51
+
50
52
### Through the Component State
51
53
52
54
Use the component's state property of the `OnStateChanged` event argument. This approach applies to the Gantt, Grid, and TreeList because they expose the state feature. For example:
See the [complete example](#example-with-component-state) at the bottom of the article.
76
78
77
79
78
80
## Filtering
79
81
80
82
The `args.Request.Filters` and the `args....State.FilterDescriptors` are collections of [`IFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.IFilterDescriptor). To access the filtering criteria, such as the user input to filter by, cast each `IFilterDescriptor` from the respective collection:
81
83
82
-
* 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).
84
+
* If the component is of type input or select, such as the AutoComplete, ComboBox, DropDownList, MultiColumnComboBox, MultiSelect, cast the first `IFilterDescriptor` from the collection to [`FilterDescriptor`](/blazor-ui/api/telerik.datasource.filterdescriptor).
83
85
* Otherwise, cast each `IFilterDescriptor` from the `args.Request.Filters` collection, respectively from the `args....State.FilterDescriptors` collection, to [`CompositeFilterDescriptor`](/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor).
84
86
85
87
### CompositeFilterDescriptor
@@ -109,12 +111,15 @@ The searching criteria in a Grid or TreeList are stored in an individual `IFilte
109
111
The sorting criteria in a Grid, TreeList or Gantt are stored in a collection of [`SortDescriptor`](/blazor-ui/api/telerik.datasource.sortdescriptor) objects. Each `SortDescriptor` instance gives access to:
110
112
* The `Member`—The field where the user sorts.
111
113
* The `SortDirection`—The sort direction for this sort descriptor.
114
+
112
115
When the [`SortMode`](/blazor-ui/api/Telerik.Blazor.SortMode) is `Multiple`, you may need to consider the order of the `SortDescriptor` instances. The first applied sorting criteria take precedence over all others. If there are equal values in the first sorted items, then those items are sorted by the following sorting criteria.
113
116
114
117
115
118
## Grouping
116
119
117
-
Т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. The user may group by multiple fields. The groups for subsequent fields will be nested within their parent groups. The grouping criteria from the parent group are stored in the first `GroupDescriptor` instance from the collection.
120
+
Тhe grouping criteria for each group are stored in an individual collection of [`GroupDescriptor`](/blazor-ui/api/telerik.datasource.groupdescriptor) objects. The `GroupDescriptor` class inherits the `SortDescriptor` class and gives access to the same properties as the `SortDescriptor` class.
121
+
122
+
The user may group by multiple fields. The groups for subsequent fields will be nested within their parent groups. The grouping criteria from the parent group are stored in the first `GroupDescriptor` instance from the collection.
118
123
119
124
120
125
## Example with OnRead Event Handler
@@ -147,13 +152,13 @@ You can obtain the FilterDescriptor, SortDescriptor, and GroupDescriptor in the
147
152
148
153
149
154
@code {
150
-
private MarkupString ConsoleSim { get; set; } // to showcase what you get
155
+
private MarkupString ConsoleSim { get; set; } //To showcase what you get.
Copy file name to clipboardExpand all lines: components/autocomplete/events.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
@@ -116,7 +116,7 @@ from model: @Role
116
116
117
117
## OnRead
118
118
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:
119
+
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component based on custom logic and the current user input and/or scroll position (when using[virtualization]({%slug autocomplete-virtualization%})). The event fires when:
120
120
121
121
* The component initializes.
122
122
* The user [filters]({%slug autocomplete-filter%}).
Copy file name to clipboardExpand all lines: components/combobox/events.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
@@ -175,7 +175,7 @@ See the [ComboBox Overview - Selected Item]({%slug components/combobox/overview%
175
175
176
176
## OnRead
177
177
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:
178
+
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component based on custom logic and the current user input and/or scroll position (when using[virtualization]({%slug combobox-virtualization%})). The event fires when:
179
179
180
180
* The component initializes.
181
181
* The user [filters]({%slug components/combobox/filter%}).
Copy file name to clipboardExpand all lines: components/dropdownlist/events.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
@@ -99,7 +99,7 @@ from the model: @MySelectedItem
99
99
100
100
## OnRead
101
101
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:
102
+
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component based on custom logic and the current user input and/or scroll position (when using[virtualization]({%slug dropdownlist-virtualization%})). The event fires when:
103
103
104
104
* The component initializes.
105
105
* The user [filters]({%slug components/dropdownlist/filter%}).
0 commit comments