Adding new column in treegrid dynamically

Hi,

   Is it possible to add new COLUMN in Treegrid (Angular) by user which in turn added(updated) to linked API ?


1 Reply

PP Pooja Priya Krishna Moorthy Syncfusion Team December 23, 2021 11:05 AM UTC

Hi jenila, 

Yes, we can able to add a new column in treegrid dynamically. We have prepared a sample and also code snippets for your reference  

Code Snippets:  
function changeOrder() { 
  var obj = $("#TreeGridContainer").ejTreeGrid("instance"); 
  var col = $.extend(true, [], obj.model.columns);     
  col.push({field: "custom", headerText: "custom"}); 
  obj.setModel({ "columns": col }); 
} 
 


Regards, 
Premkumar S 


Loader.
Up arrow icon