Declined
Last Updated: 30 Mar 2021 15:35 by ADMIN
Anna
Created on: 15 Dec 2017 17:00
Category: Grid
Type: Feature Request
5
Add cell/container info to grid beforeEdit event
The grid "beforeEdit" event is designed, as per documentation, "for preventing the editing depending on custom logic".

However, this event provides only information about the edited row, not cell, which severely limits what that logic can do.

A related event, "edit", passes information about the container, which is a table cell in incell mode. There is no reason for "beforeEdit" not to do the same - both event are triggered merely several lines apart.
3 comments
ADMIN
Tsvetomir
Posted on: 30 Mar 2021 15:35

Hello,

I am marking the current thread as declined due to the fact no further information has been provided. Furthermore, such functionality is readily available - columns.editable.

 

Regards,
Tsvetomir
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/.

ADMIN
Tsvetomir
Posted on: 15 Dec 2020 12:57

Hi,

The initial purpose for introducing the beforeEdit event of the grid is to allow the developer to prevent entering into edit mode or more specifically - before the "editable" object is created. Therefore, at the time the beforeEdit event is triggered, there are no editors or any elements inside the cell.

We can expose the "cell" that is currently in edit mode, however, it would not bring any additional information. Could you share more details on the exact scenario that you are willing to achieve so that we could investigate for possible solutions? Is the HTML element of the "cell" sufficient for your use-case?

Alternatively, we have introduced the "editable" property that serves a similar purpose:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.editable

If you would like to access an editor or any rendered HTML inside the cell, make use of the "edit" event.

 

Best regards,
Tsvetomir
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/.

Chris
Posted on: 09 Dec 2020 00:44
You're right. You can work around this by using the "edit" event, look at the container.index() as your cellIndex, and close the editor with this.closeCell(); you cannot event.preventDefault() because the editor is already created. You thankfully do not see the editor with this workaround.