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

Display Problems regarding to ejTreeView

Hello syncfusion 
I have used the ejTreeView but the results of the display seems incomplete. 
The incomplete display is enclosed with the question. (there are no nodes displayed with next to the child items)
Are you familiar with this type of problem? 
If so, how to I solve this? 

Thank you 

Attachment: fsda_4f073a61_b576cdca.zip

1 Reply

PR Piramanayagam Ramakrishnan Syncfusion Team August 16, 2016 11:20 AM UTC

Hi Maverickjin, 
Thanks for contacting Syncfusion support. 
We have analyzed your query and given code. Based on this, we suspect that you didn’t add the “expanded” member field for child node’s object of data source. The condition (this.opt.expanded === true) fails always since you didn’t specify expanded variable in your source. So that, child nodes are not loaded at initial rendering. Please refer the below code sample, 
//전체 펼치기 
//if (this.opt.expanded === true) { // this condition always fails due to variable is not defined  
    if (this.opt.fields != null) { 
        if (this.opt.fields.dataSource != null) { 
            var dataArr = this.opt.fields.dataSource; 
            $.each(dataArr, function (i, val) { 
                val.expanded = true 
//expanded variable is not defined 
    allowDragAndDrop: true, 
    allowDropChild: false, 
    allowDropSibling: true, 
    allowDragAndDropAcrossControl: true, 
    fields: { 
        id: "id" 
            , text: "text" 
            , parentId: "parentId" 
            , dataSource: subjectAreaTreeData 
            , seq: "seq" 
    setBtn: { add: false, mod: false, del: true }, 
    nodeSelect: subjectNodeSelect, 
    nodeDropped: subjectNodeDropped 
We have prepared the sample based on your requirement (“Need to display all nodes in TreeView”) with your given code in the link: http://jsplayground.syncfusion.com/hq1ki501 
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. 
Piramanayagam R

Live Chat Icon For mobile
Up arrow icon