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

First node not expanded after view init

Hello,

data for treeview I am getting from backend and database. I am using property loadOnDemand:true. I am using this code to get data from backend:
    ngAfterViewInit()
    {
        $("#treeView").ejTreeView({loadOnDemand: true});

        var dataManager = new ej.DataManager({ url: this.myUrl + "menu/GetMenuPost", crossDomain: true, adaptor: new ej.UrlAdaptor(),
            headers: [{Authorization: 'Bearer ' + JSON.parse(localStorage.getItem('currentUser')).authToken}]  });

        this.menuFields = { dataSource: dataManager, id: 'id', parentId: 'parent_Id', text: 'text', hasChild: 'leaf', expanded: 'expanded', imageUrl: 'iconCls', tableName: 'className' };
    }

When I set property expanded to true in my backend, the first node after view init is not expanded. But when I expand it, all other nodes is expanded. What do I need to do to get my first node expand after view init?

2 Replies

KR Karthik Ravichandran Syncfusion Team February 4, 2017 07:01 AM UTC

Hi Agne, 
 
Thanks for contacting Syncfusion support. 
 
We have considered this as a bug in our side and the fix will be available in Volume 1, 2017 main release which will be available in the mid of February 2017. 
 
Regards, 
Karthik R 



KR Karthik Ravichandran Syncfusion Team February 23, 2017 04:46 AM UTC

Hi Agne,   
We are glad to announce that our Essential Studio 2017 Volume 1 Main Release v15.1.0.33 is rolled out and is available for download under the following link. 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Karthik R 


Loader.
Up arrow icon