This is a migrated thread and some comments may be shown as answers.

Going out from edit mode without confirmation/cancel

3 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ro
Top achievements
Rank 1
Ro asked on 30 Apr 2015, 10:41 AM

Hi,

When opening a row in the grid for edit in inline grid, and the row is still open.

If user presses on another buttons on the page, for example on the title of the grid - 

the row will go out from edit mode, but the user didn't press on confirmation or cancel.

This behavior causes problems. Is there a way to avoid this?

Is there a way that as long as  the row is in edit mode, the user won't be able to press on other buttons?

Thanks,

Yael

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 04 May 2015, 07:49 AM

Hello Ro,

In this case it is up to the developer to prevent any other interactions while the Grid is editing. This could be achieved by checking the state of the editable field of the Grid.
E.g.

$("#mybutton").click(function (e) {
    var grid = $("#grid").data("kendoGrid");
    if (grid.editable) {
        e.preventDefault();
    }
});

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ro
Top achievements
Rank 1
answered on 11 May 2015, 02:35 PM

Hi,

Thanks for your solution.

Problem is that this code I'll have to write in every control that I have on the screen.

(Including when pressing on the header of the grid in order to sort the data)

Do you have an idea for something generic?

Thanks ahead!

0
Dimiter Madjarov
Telerik team
answered on 11 May 2015, 03:00 PM

Hello Ro,

The purpose of the example was to demonstrate the approach to check whether the Grid is currently edited or not. It is up to the developer to decide where to use it and which user actions to prevent.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Ro
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Ro
Top achievements
Rank 1
Share this question
or