Hi Stefano,
Thanks for contacting Syncfusion support.
We have achieved your requirement ”Show warning message while save the record” using
actionBegin event. This event triggered for every grid action before its starts. We can get the request type and check the condition in this event. If the requestType is save then we have to open the confirmation dialog and bind the two click events for save or cancel the edit operation.
Please refer to the code example, Help document and Sample,
Code Example:
<script>
var temp=false;
function actionbegin(e){
if(e.requestType == "save" && temp == false){
e.cancel=true;
$("#Dialog").ejDialog("open");
$("#Grid").addClass('disablegrid');
}
temp=false;
}
function click1(args){
var obj=$("#Grid").ejGrid('instance');
temp=true;
obj.endEdit();
$("#Dialog").ejDialog("close");
$("#Grid").removeClass('disablegrid');
}
function click2(args){
$("#Dialog").ejDialog("close");
$("#Grid").removeClass('disablegrid');
}
|
Help document:
http://help.syncfusion.com/js/api/ejgrid#events:actionbegin
Sample:
http://jsplayground.syncfusion.com/3q3hgtah
Regards,
Venkatesh Ayothiraman.