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

Hierarchical treeview with parent and child datasources

Thread ID:





129705 Mar 29,2017 03:25 PM UTC Apr 5,2017 12:20 PM UTC JavaScript 3
Tags: ejTreeView
Tomasz Bednarek
Asked On March 29, 2017 03:25 PM UTC

Hi Syncfusion,

Would you please help me out with the ejTreeView control?
I'm trying to display a 2-level list of checkbox items with a separate datasource for parents and children.
I cannot get the children to be displayed. What am I doing wrong?

Thank you in advance,
Tomasz Bednarek

Karthik Ravichandran [Syncfusion]
Replied On March 30, 2017 12:09 PM UTC

Hi Tomasz, 
Thanks for contacting Syncfusion support. 
You can achieve your requirement by processing your dataSource using ej.DataManager. Please refer the below code block. 
var therapeuticAreas1 = new ej.DataManager(therapeuticAreas); 
var projects1 = new ej.DataManager(projects); 
    fields: { 
        dataSource: therapeuticAreas1, id: "id", text: "name", 
        child: { 
            dataSource: projects1, id: "id", parentId: "therapeuticAreaId", text: "name" 
    allowMultiSelection: true, 
    showCheckbox: true, 
    fullRowSelect: true 
Based on your requirement we have modified your sample, please refer the below link. 
Please let us know if you need further assistance on this. 
Karthik R 

Tomasz Bednarek
Replied On April 4, 2017 10:52 AM UTC

Hi Karthik,

Thanks, it works. I think it would be a good idea to review and extend the documentation of the control, especially the fields section, because you have no chance of knowing the correct approach by reading the documentation.

Kind Regards,
Tomasz Bednarek

Karthik Ravichandran [Syncfusion]
Replied On April 5, 2017 12:20 PM UTC

Hi Tomasz, 
Thanks for your update. 
We will consider this as an improvement in our side and we will improve our document in our upcoming releases. 
Please let us know if you have any concerns 
Karthik R 


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