Avoid selecting checkbox when click on any row in kendo react grid

2 Answers 68 Views
Grid
seenu
Top achievements
Rank 2
Iron
Iron
Iron
seenu asked on 14 Oct 2021, 06:17 PM

Hi Team,

I am working on the grid with checkbox using the sample provided here https://www.telerik.com/kendo-react-ui/components/grid/selection/

its working as stated in the example, but one question, is there way to avoid row checkbox to not checked when we click on any other column in the grid(other than checkbox column).

for example, in below screen i am clicking on product name(2nd) column and entire row is selected and checkbox is checked. i don't want checkbox to be checked when i click on other columns.

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Filip
Telerik team
answered on 15 Oct 2021, 01:49 PM

Hello,

You can prevent the selection of the checkboxes when clicking on a column by changing the enabled setting to false. You can take a look at the following example:

https://stackblitz.com/edit/react-62xdvt-onyhmj?file=app/main.jsx

Regards, Philip Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

seenu
Top achievements
Rank 2
Iron
Iron
Iron
commented on 18 Oct 2021, 06:16 AM

Thank you Philip for your help, its working as expected
0
Filip
Telerik team
answered on 18 Oct 2021, 10:37 AM

Hello,

Just to give you a quick update, after some research on our part we reached the conclusion that this approach is an issue in the component and we logged it as such here. This is because setting enabled to false should stop all selection.

Instead of setting the enabled setting to false you can currently check if the selected item is a checkbox and if it is indeed a checkbox you can update the state like in the following example:

https://stackblitz.com/edit/react-62xdvt-kscdwn?file=app/main.jsx

Regards, Philip Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
seenu
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Filip
Telerik team
Share this question
or