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: components/grid/selection/cells.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,8 @@ To enable cell selection:
91
91
92
92
You can respond to user selection actions through the `SelectedCellsChanged` event. The event handler receives a collection of type `IEnumerable<GridSelectedCellDescriptor>`. The collection may have multiple, single, or no objects in it, depending on the `SelectionMode` and the last user selection.
93
93
94
+
> The `SelectedCellsChanged` event handler cannot be awaited. To execute asynchronous operations when the user selects rows, use the [`OnRowClick`]({%slug grid-events%}#onrowclick) or [`OnRowDoubleClick`]({%slug grid-events%}#onrowdoubleclick) event instead.
95
+
94
96
>caption Using the Grid SelectedCellsChanged event
95
97
96
98
````CSHTML
@@ -170,10 +172,6 @@ You can respond to user selection actions through the `SelectedCellsChanged` eve
170
172
}
171
173
````
172
174
173
-
### SelectedCellsChanged and Asynchronous Operations
174
-
175
-
The `SelectedCellsChanged` event handler cannot be awaited. To execute asynchronous operations when the user selects rows, use the [`OnRowClick`]({%slug grid-events%}#onrowclick) or [`OnRowDoubleClick`]({%slug grid-events%}#onrowdoubleclick) event instead.
176
-
177
175
## GridSelectedCellDescriptor
178
176
179
177
The `GridSelectedCellDescriptor` type exposes the following properties:
Copy file name to clipboardExpand all lines: components/grid/selection/overview.md
+1-10Lines changed: 1 addition & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,7 @@ The Grid component supports row and cell selection. When you select a row or a c
20
20
21
21
## Enable Row or Cell Selection
22
22
23
-
You can configure the Grid either for row or cell selection:
24
-
25
-
* To enable row selection:
26
-
* Set the [Grid `SelectionMode` parameter](#use-single-or-multiple-selection) or
27
-
* Add a `<GridSelectionSettings>` tag to the `<GridSettings>` tag, and set the `SelectionType` parameter to `GridSelectionType.Row`.
28
-
* Optionally, you can also select rows through the [checkbox column]({%slug components/grid/columns/checkbox%}).
29
-
* To enable cell selection:
30
-
* Add a `<GridSelectionSettings>` tag to the `<GridSettings>` tag, and set the `SelectionType` parameter to `GridSelectionType.Cell`.
31
-
32
-
See [Rows Selection Basics]({%slug grid-selection-row%}#basics) and [Cells Selection Basics]({%slug grid-selection-cell%}#basics) for more details.
23
+
You can configure the Grid either for row or cell selection. See [Rows Selection Basics]({%slug grid-selection-row%}#basics) and [Cells Selection Basics]({%slug grid-selection-cell%}#basics) for more details and examples.
Copy file name to clipboardExpand all lines: components/grid/selection/rows.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,13 @@ To select a range of rows, hold the **Shift** key, while clicking on the first a
20
20
21
21
Check the [Grid Keyboard navigation demo](https://demos.telerik.com/blazor-ui/grid/keyboard-navigation) for detailed information about selecting rows with the keyboard.
22
22
23
-
You can also render a checkbox column that allows users to select and deselect rows. To use checkbox selection, add a [`GridCheckboxColumn`]({%slug components/grid/columns/checkbox%}) in the `GridColumns` collection of the Grid. The `GridCheckboxColumn` provides [additional configuration settings related to selection]({%slug components/grid/columns/checkbox%}#parameters).
23
+
To enable row selection:
24
+
25
+
1. Define the selection mode through one of the following options:
26
+
* Set the [Grid `SelectionMode` parameter]({%slug grid-selection-overview%}#use-single-or-multiple-selection), or
27
+
* Add a `<GridSelectionSettings>` tag inside the Grid `<GridSettings>` tag, and set the `SelectionType` parameter to `GridSelectionType.Row`.
28
+
1. Set the Grid `SelectedItems` parameter to a collection of type `IEnumerable<TItem>` where `TItem` is the Grid model class. The collection must be initialized in advance.
29
+
1. Optionally, add a [checkbox column]({%slug components/grid/columns/checkbox%}) to the `GridColumns` collection of the Grid. The `GridCheckboxColumn` provides [additional configuration settings related to selection]({%slug components/grid/columns/checkbox%}#parameters).
24
30
25
31
>caption Grid multiple row selection
26
32
@@ -78,6 +84,8 @@ You can also render a checkbox column that allows users to select and deselect r
78
84
79
85
You can respond to user selection actions through the `SelectedItemsChanged` event. The event handler receives a collection of the Grid data model. The collection may have multiple, single, or no items in it, depending on the `SelectionMode` and the last user selection.
80
86
87
+
> The `SelectedItemsChanged` event handler cannot be awaited. To execute asynchronous operations when the user selects rows, use the [`OnRowClick`]({%slug grid-events%}#onrowclick) or [`OnRowDoubleClick`]({%slug grid-events%}#onrowdoubleclick) event instead.
88
+
81
89
>caption Using the Grid SelectedItemsChanged event
82
90
83
91
````CSHTML
@@ -146,10 +154,6 @@ You can respond to user selection actions through the `SelectedItemsChanged` eve
146
154
}
147
155
````
148
156
149
-
### SelectedItemsChanged and Asynchronous Operations
150
-
151
-
The `SelectedItemsChanged` event handler cannot be awaited. To execute asynchronous operations when the user selects rows, use the [`OnRowClick`]({%slug grid-events%}#onrowclick) or [`OnRowDoubleClick`]({%slug grid-events%}#onrowdoubleclick) event instead.
152
-
153
157
## Selection When Data Changes
154
158
155
159
When the Grid `Data` collection changes, the `SelectedItems` collection has the following behavior:
0 commit comments