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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add a row/record in TreeGrid with children?

Thread ID:

Created:

Updated:

Platform:

Replies:

149864 Dec 12,2019 07:52 AM UTC Dec 14,2019 02:24 PM UTC JavaScript - EJ 2 1
loading
Tags: TreeGrid
Awais Ashraf
Asked On December 12, 2019 07:52 AM UTC

I want to programatically add a new row in treegrid with children. But latest version doesn't have a addRow method and addRecord is not working as expected.
I tried adding a row using dataSource. That adds a row, but not with children. Please tell me a solution ASAP, its urgent.

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On December 14, 2019 02:24 PM UTC

Hi Awais, 

Thanks for contacting Syncfusion Support. 

QUERY: Programmatically add new row with child in TreeGrid 

From your query we understand that you need to add both parent and child record programatically to TreeGrid. This can be achieved by using "dataSource" property of TreeGrid. 

Please check the below sample, 

In the above sample, we have added new record to Treegrid along with it's children in button click. When you click the button placed above the TreeGrid, new record will be added. 

If you have further queries, please get back to us. 

Regards, 
Farveen sulthana T 


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.

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