Grid kendo react

0 Answers 59 Views
Grid
Akiva
Top achievements
Rank 1
Akiva asked on 25 Oct 2022, 02:34 PM | edited on 25 Oct 2022, 02:43 PM
Hi,

How I can create the ability to select all rows with ctrl+A ?
Wissam
Telerik team
commented on 26 Oct 2022, 11:01 AM

Hi, Akiva,

I have prepared the following example of the Grid with the `ctrl+A` functionality:

https://stackblitz.com/edit/react-w49pkw-wjh1r5?file=app%2Fmain.jsx

In the above Stackblitz code, the Grid is wrapped with an `<span>` element and its onKeyDown event is handled. Inside the handler, we are checking if the control key and the `A` button (keycode 65) are clicked. Then we are setting the `selectAll` state variable to `true`. The `selectAll` state variable is used inside the Grid `data` prop, to set the selection of all the items to `true`.

You can additionally check the following articles about the Grid's selection and keyboard navigation:

https://www.telerik.com/kendo-react-ui/components/grid/selection/

https://www.telerik.com/kendo-react-ui/components/grid/keyboard-navigation/

I hope this helps, please let us know if you have any further questions.

Regards,
Wissam
Progress Telerik

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Akiva
Top achievements
Rank 1
Share this question
or