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. Image for the cookie policy date

Cell edit by single click in batch mode

Hi All,

I want to enable the cell editable by single click on the cell. Currently by default has the double click option. Please advice me on this.

Thank you.

3 Replies

HJ Hariharan J V Syncfusion Team May 13, 2019 10:27 AM UTC

Hi Neo, 
  
Thanks for contacting Syncfusion support. 
  
We have validated your query and created a sample based on your requirement. In the below sample, we have bind click event for grid and edit the cell by using editCell method. Please refer the below code example and sample for more information. 
  
  click(args){ 
        if (args.target.classList.contains("e-rowcell")) { 
            var index = parseInt(args.target.getAttribute("Index")); 
            var colindex = parseInt(args.target.getAttribute("aria-colindex")); 
            var field = this.gridObj.getColumns()[colindex].field; 
            this.gridObj.editModule.editCell(index, field); 
        } 
    } 
  
  
  
Regards, 
Hariharan 



NE Neo replied to Hariharan J V May 14, 2019 04:24 AM UTC

Hi Neo, 
  
Thanks for contacting Syncfusion support. 
  
We have validated your query and created a sample based on your requirement. In the below sample, we have bind click event for grid and edit the cell by using editCell method. Please refer the below code example and sample for more information. 
  
  click(args){ 
        if (args.target.classList.contains("e-rowcell")) { 
            var index = parseInt(args.target.getAttribute("Index")); 
            var colindex = parseInt(args.target.getAttribute("aria-colindex")); 
            var field = this.gridObj.getColumns()[colindex].field; 
            this.gridObj.editModule.editCell(index, field); 
        } 
    } 
  
  
  
Regards, 
Hariharan 


Hi Hariharan,

It's working perfectly. Thank you very much.


HJ Hariharan J V Syncfusion Team May 15, 2019 07:01 AM UTC

Hi Neo,

Thanks for your update.

We are happy to hear that your requirement has been resolved.

Regards,
Hariharan


Loader.
Live Chat Icon For mobile
Up arrow icon