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.
Unfortunately, activation email could not send to your email. Please try again.

user canceled editing - how to get this event?

Thread ID:

Created:

Updated:

Platform:

Replies:

127830 Dec 12,2016 06:32 AM Dec 14,2016 07:29 AM JavaScript 3
loading
Tags: ejTreeGrid
Razgovorov Mikhail
Asked On December 12, 2016 06:32 AM


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 06:52 AM

 
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. 
$("#TreeGridContainer").ejTreeGrid({ 
       //… 
       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. 


Thanks, 
Bharath. 


Razgovorov Mikhail
Replied On December 13, 2016 10:50 AM

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 07:29 AM

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: 
            $("#TreeGridContainer").ejTreeGrid({ 
                toolbarClick:toolbarclick, 
                 
        });  
        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 
 
Regards, 
Jone sherine P S 


CONFIRMATION

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.

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.

;