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

Data binding

Thread ID:





124551 Jun 14,2016 06:52 AM UTC Jun 15,2016 11:55 AM UTC JavaScript 1
Tags: ejTreeView
Gary Wadden
Asked On June 14, 2016 06:52 AM UTC


When using javascript tools of a hierarchical nature such as OrgChart (ejDiagram)
or ejTreeView abd the data is returned from a database query (in jSON format)
the chart or treeview are not displayed if the root object(s) hav a NULL entry
in the ParentId column.

For example if I paste the data directly into the page and remove the null ParentId
the OrgChart displays.  Replace the null ParentID no Orgchart.

Code extract for treeview:

 function DisplayTreeView(data) {
showCheckBox: true,
fields: { id: "Id", parentId: "ParentId", text: "EntityName", hasChild: "HasChild", expanded: "Expanded", dataSource: data }

Sample Data:

Root Object
EntityName:"Early Childhood & Sch Ed Group"

Child Object
EntityName:"Reform Implementation"



Piramanayagam Ramakrishnan [Syncfusion]
Replied On June 15, 2016 11:55 AM UTC

Hi Gary, 
Thanks for contacting Syncfusion support. 
Query1: The treeview is not displayed if the root object(s) has a NULL entry in the ParentId column. 
We are unable to reproduce the reported issue (“The TreeView is not displayed if the root object has null entry in ParentId column”) in TreeView control. TreeView is working properly with given code. 
For your reference we have prepared the sample to showcase that TreeView control is working properly with given code in the link: http://jsplayground.syncfusion.com/2a1k3ml4 
If you still face the same issue, kindly get back to us with more information or provide sample based on your application along with the replication procedure to reproduce the issue at our end. This would be helpful for us to identify the issue and provide a solution at the earliest.

Query2: The OrgChart is not displayed if the root object(s) has a NULL entry in the ParentId column.
Please confirm whether the OrgChart didn’t render, when you set root’s parentId as null. If so, we are unable to reproduce the reported issue at our end. Please check with the below playground link and let us know if you are facing any issues at your end.
Here is the playground link  
Piramanayagam 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

or the page will be automatically redirected to 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