Disable double click on TreeGrid

Hi,

I want to only allow the edits from clicking the edit button on the toolbar and not allowing the user to double click on the row to edit.

How can I disable clicking with the mouse on row or cell for a single click or double click?

David

1 Reply

PE Punniyamoorthi Elangovan Syncfusion Team March 15, 2018 03:32 PM UTC

Hi David, 
Thank you for contacting Syncfusion support. 
We have analyzed your query and your requirement can be achieved by using the beginEdit and toolbarClick client side events. Please refer the below code snippet. 
 
<ej:TreeGrid runat="server" ID="TreeGrid" IdMapping="Id" ParentIdMapping="ParentId" ToolbarClick="toolbarClick" BeginEdit="beginEdit" 
//… 
 
</ej:TreeGrid> 
 
<script type="text/javascript"> 
         var allowEditing; 
         function toolbarClick(args) { 
             if (args.itemName == "Edit") 
                 allowEditing = true; 
         } 
         function beginEdit(args) { 
             if (!allowEditing) 
                 args.cancel = true; 
             allowEditing = false; 
         } 
</script> 
 
 
We have prepared the sample with your requirement please refer this 
Please let us know if you require further assistance on this. 
Regards, 
Punniyamoorthi 



Loader.
Up arrow icon