Double click edit event

Hi,

I have a data grid, using Normal edit mode, and double click will start edit event.

what I am trying to do is : when double click the row, there's a parameter (called iseditmode) control the next step.

If iseditmode = true, then start the edit event.

if iseditmode = false, then do something else.

Could you help me to point where should I insert this if statement?

Thanks

Fan 


1 Reply

SK Sujith Kumar Rajkumar Syncfusion Team November 18, 2021 08:32 AM UTC

Hi Fan, 
 
Greetings from Syncfusion support. 
 
Based on the query we could understand that your requirement is to perform/prevent Grid edit based on an external property value. You can achieve this by using the Grid’s actionBegin event where the edit action can be cancelled(based on the external property value) by setting the cancel event arguments as false. This is demonstrated in the below code snippet for your reference, 
 
// Grid’s actionBegin event handler 
actionBegin: function(args) { 
  if (args.requestType === 'beginEdit' && !this.iseditmode) { 
    // Grid edit action is cancelled 
   args.cancel = true; 
  } 
} 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon