We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Warning message when selected row changes

Thread ID:

Created:

Updated:

Platform:

Replies:

123480 Mar 21,2016 12:46 PM Mar 22,2016 05:05 AM JavaScript 1
loading
Tags: ejGrid
Stefano Enrico
Asked On March 21, 2016 12:46 PM

Hi, 
I have a editable grid with editMode = normal. Is it possible to show a warning message when user changes selected row, instead of saving directly?
Thanks
Stefano

Venkatesh Ayothi Raman [Syncfusion]
Replied On March 22, 2016 05:05 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;