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

user canceled editing - how to get this event?

Thread ID:





127830 Dec 12,2016 11:32 AM UTC Dec 14,2016 12:29 PM UTC JavaScript 3
Tags: ejTreeGrid
Razgovorov Mikhail
Asked On December 12, 2016 11:32 AM UTC

when the user started editing - I showed additional columns.
after editing - I want to hide the additional columns.

Bharath Marimuthu [Syncfusion]
Replied On December 13, 2016 11:52 AM UTC

Hi Razgovorov, 

Thanks for contacting Syncfusion support. 
By using “beginEdit” and “endEdit” client side events and “showColumn”,”hideColumn” public methods we can show/hide additional columns, please find the code snippet below. 
       beginEdit: beginEdit, 
       endEdit: endEdit, 
function beginEdit(args) { 
       this.showColumn("End Date"); 
  function endEdit(args) { 
       this.hideColumn("End Date"); 
We have prepared the sample for this, in this sample we have shown/hide columns on editing actions. 
Please find the sample from below mentioned location. 


Razgovorov Mikhail
Replied On December 13, 2016 03:50 PM UTC

If you press the ESC key or cancel editing on toolbar - event did not come. and in your example too

thanks for the answer.

Jonesherine Stephen [Syncfusion]
Replied On December 14, 2016 12:29 PM UTC

Hi Razgovorov, 
At present there is no support for any client side events while canceling the edit action in TreeGrid. But we can show/hide the particular column on toolbar cancel click action by using “toolbarClick” event. And by using the jquery keydown action we can hide the column on esc key navigation.  
Please find the code example below: 
        function toolbarclick(args) {            
            if(args.itemName=="Cancel" || args.itemName=="ExpandAll" || args.itemName=="CollapseAll") 
                this.hideColumn("End Date"); 
        $(document).keydown(function (e) { 
            //To hide the column on esc key navigation 
            if (e.keyCode === 27) {                
                var treeObj = $("#TreeGridContainer").data("ejTreeGrid"); 
                treeObj.hideColumn("End Date");               
We have also prepared the sample based on this. Please find the sample from below location 
Jone sherine P S 


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

or the page will be automatically redirected to 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