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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to enforce event

Thread ID:





132314 Aug 25,2017 12:45 PM UTC Aug 29,2017 11:56 AM UTC JavaScript 3
Tags: ejTreeGrid
Bogumil Styczen
Asked On August 25, 2017 12:45 PM UTC


when you double click treegrid node beginEdit event occurs, how to enforce this event from code?


Suriyaprasanth Ravikumar [Syncfusion]
Replied On August 28, 2017 12:14 PM UTC

Hi Bogumil, 
The “beginEdit” client side event will be trigger only when we perform double click on the record, it is not possible to enforce the “beginEdit” event from code. 
Can you please share some more information about the requirement you needed on the “beginEdit” event, it will be helpful for us to serve you better.. 
Suriyaprasanth R. 

Bogumil Styczen
Replied On August 28, 2017 12:33 PM UTC


I have tree grid and I want to rename specified node not only by doublicking it, but as the result of clicking button "rename" placed on Ribbon or from the context menuy. That is why I need the possibility of triggering "edit" event. It's the same case like with toolbar button "edit" in treegrid. But i don't what to use toolbar feature. 

Thank you. 

Suriyaprasanth Ravikumar [Syncfusion]
Replied On August 29, 2017 11:56 AM UTC

Hi Bogumil, 
In TreeGrid, we have a public method called “cellEdit” to make any cell to editable state by passing its row index and header text as argument. 
For this method we need to select the row before call the “cellEdit” method, we can select the row in TreeGrid by using “selectedRowIndex” property. 
We also have a public method called “saveCell” to save any edited cell. And also, we can edit any cell/row by using context menu support. 
Please refer following code snippet, 
    <button onclick="rename()">Rename</button> 
    <div id="TreeGridContainer" style="width: 100%; height: 450px;"></div> 
                dataSource: sampleData, 
                contextMenuSettings: { 
                    showContextMenu: true, 
                    contextMenuItems: ["add", "edit", "delete"] 
        function rename() { 
            $("#TreeGridContainer").ejTreeGrid('model.selectedRowIndex', 2);  // Select the row to edit. 
            var treeObj = $("#TreeGridContainer").ejTreeGrid('instance'); 
            treeObj.cellEdit(2, 'taskName'); // Public method to make any cell to editable state - cellEdit(rowIndex,headerText). 
            //treeObj.saveCell(); // Public method to save any edited cell. 
We have also prepared a sample for your reference, please find the sample location as below, 
Suriyaprasanth R. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon