Telerik MVC Grid - Inline Edit: Save when leaving row

1 Answer 161 Views
Grid
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Stefan asked on 08 Nov 2022, 07:20 AM

Hi,

we implemented the functionality like described here: https://www.telerik.com/forums/auto-save-row-when-moving-to-the-next-row#login

This works well when switching rows inside the grid, but unfortunately it doesn't work when leaving the grid, or when using any of the function buttons (NEW, DELETE) inside the grid.

Is there an easy way to handle these cases too?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 10 Nov 2022, 10:52 AM

Hello Stefan,

 

Thank you for contacting us.

You can try to run the .saveChanges() method within the .Events(e=>e.CellClose(...)) handler of the grid:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/cellclose

Or within the onblur event handler of the input itself.

Feel free to give this solution a try and let me know about the result.

 

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

Stefan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 24 Nov 2022, 01:45 PM

Hi Eyup,

thank you for the input, but how would I find out if I have left the row/the grid with this?

Is there an event maybe which triggers on leaving a row or the grid (and not the cell)?

Eyup
Telerik team
commented on 29 Nov 2022, 01:27 PM

I am afraid the Grid does not provide a similar event for the row, but you can try to attach a global onblur event handler to the grid's wrapper element. You can also check the document.activeElement instance capabilities.

For more accurate suggestions, can you open a formal support ticket and send us a very basic isolated MVC app simulating your project? Then, we will be able to provide more precise approach.

Tags
Grid
Asked by
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or