New to Kendo UI for Vue? Start a free 30-day trial
Select Native Grid Rows When Specific Buttons are Pressed.
Environment
Product Version | 3.10.0 |
Product | Progress® Kendo UI for Vue Native |
Description
This KB article demonstrates how you can limit the rows' selection of the Native Grid by pressing specific keyboard keys. In the following example the rows of the Native Grid can be selected or deselected only when the Shift, Ctrl or Command(for Mac) keyboard buttons are pressed.
KB sections
Solution description
To achieve the following scenario, we use the onRowClick event of the Native Grid and the following code:
jsx
onRowClick(event) {
if (event.event.metaKey || event.event.ctrlKey || event.event.shiftKey) {
event.dataItem[this.selectedField] =
!event.dataItem[this.selectedField];
}
}
Runnable example
To test the following example press Ctrl
, Shift
or Command(for Mac)
buttons and click on selected Grid row.
Change Theme
Theme
Loading ...