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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Different version

Thread ID:





149140 Nov 15,2019 02:33 PM UTC Nov 19,2019 01:39 PM UTC Angular - EJ 2 3
Tags: TreeGrid
Asked On November 15, 2019 02:33 PM UTC


Got a simple question to ask.

Does tree grid editing work (with template and etc) in ej2-angular-treegrid 17.1.49 version ?

Dinesh Rajendiran [Syncfusion]
Replied On November 18, 2019 08:54 AM UTC

Hi Domantas, 

Thanks for using Syncfusion Products. 

The editing feature will work in the TreeGrid ej2-Angular version “17.1.49” with templates. We have included a sample in which AutoComplete component is rendered using editTemplate to “TaskName” column of TreeGrid. 

Please refer the link below. 

If you need further assistance please get back to us. 

Dinesh Rajendiran 

Replied On November 18, 2019 02:58 PM UTC


Is it possible to change attached template on go? 
Let's say on initial load I have one template and if I'm editing the column second time I'm changing the attached template to different template.

I've tried this.grid.getColumnByField('ColumnField').edit = this.newTemplate;

But it seems that it doesn't work for me

EDIT: refreshColumns() refreshes template but it also refreshes my actions, cause I do apply template on beginEdit action so it will blur out my editing, so it would be great if I could do it without refreshColumns() method

Dinesh Rajendiran [Syncfusion]
Replied On November 19, 2019 01:39 PM UTC

Hi Domantas, 

In write event we have rendered the DropDownList component for specific cell by checking the  condition and for the other cells we have rendered the AutoComplete component. In the read event also we have returned values from either autocomplete or dropdown component based on CSS class added in element. .  Please refer the code snippet below 

read: (args) => { 
              return this.autoCompleteObj.value; 
              return this.dropDown.value; 
write: (args: { rowData: Object, column: Column, element: HTMLElement }) => { 
              if(args.rowData["taskName"] == "Design"){ 
                  this.dropDown = new DropDownList({ 
                    dataSource: <{ [key: string]: Object }[] >this.treegrid.grid.dataSource, 
                    fields: {value: 'taskName', text:"taskName"} 
              this.autoCompleteObj = new AutoComplete({ 
                dataSource: <{key: string, value: any}[]>this.treegrid.grid.dataSource, 
                fields: { value: 'taskName' }, 
                value: args.rowData[args.column.field] 

Same as this you can render multiple components in the TreeGrid columns. 

If you need further assistance please get back to us. 

Dinesh Rajendiran 


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

Live Chat Icon For mobile
Live Chat Icon