Mansi
asked on 26 Nov 2021, 09:29 AM
| edited on 29 Nov 2021, 10:45 AM
Hi,
I have included onRowClick atrribute in kendo react grid to enable editing in the row when it is clicked. Is there an event to detect a click outside the grid, so that I can disable editing in the row whenever the user clicks outside that Kendo react Grid.
Regards,
Mansi
1 Answer, 1 is accepted
0
Filip
Telerik team
answered on 01 Dec 2021, 09:16 AM
Hi, Mansi,
It is possible to disable row editing by attaching an onBlur function on the RowRender that exits editing mode. We have prepared a runnable example that shows this approach here:
We may also add logic to automatically focus the first editor as in order to fire the onBlur some elements should be focused. This logic can be seen in this demo inside the cell reader:
The demo is for in-cell editing, but a similar logic can be used for in-line editing as well.
I hope this helps.
Regards, Filip
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
where what we have mostly done is to focus the element in the cellRender and then call the exitEdit function onBlur inside of the rowRender in order to disable the editing of the cell.