TreeList expander control disappears or does not work if control is reloaded with new TreeListDataSource

0 Answers 30 Views
Data Source TreeList
George
Top achievements
Rank 3
Bronze
Bronze
Iron
George asked on 19 Jul 2024, 05:25 PM | edited on 19 Jul 2024, 05:25 PM

Hi,

I have attempted to reload a Kendo TreeView control with a new TreeViewDataSource...

function reloadLists() { console.log("In reloadLists():"); var ds2 = new kendo.data.TreeListDataSource({ data: actionsV2, schema: { model: Models.TREELISTMODELTWO } }); ds2.read(); var vw2 = ds2.view(); _view.set("actionsObserv", vw2); $("#actionsTreelist").data("kendoTreeList").setDataSource(_view.get("actionsObserv"));

}


...but when the new dataSource is loaded I noticed the expander arrows do not work. The top one disappears when clicking on it:

The other ones do not function, there is no change when I click on them. I cannot contract an expanded branch, nor can I expand a contracted branch. What am I missing? Is this a bug? Here is a link to the Kendo Dojo  with an example:

Kendo TreeList Reload List Example | Kendo UI Dojo (telerik.com)

Thanks again for your help and patience ^__^

George

George
Top achievements
Rank 3
Bronze
Bronze
Iron
commented on 22 Jul 2024, 10:23 PM | edited

I don't need:

ds2.read();
var vw2 = ds2.view(); 


function reloadLists() {

    console.log("In reloadLists():");

    var ds2 = new kendo.data.TreeListDataSource({ data: actionsV2, schema: 
                                                  { model: Models.TREELISTMODELTWO } });
    ds2.read();//***DON'T NEED THIS ***
    var vw2 = ds2.view();//***DON'T NEED THIS ***
    _view.set("actionsObserv", vw2);
    $("#actionsTreelist").data("kendoTreeList").setDataSource(_view.get("actionsObserv"));

}

Force of habit. Now it works as expected.

 

Sorry to bother you with this. PLEASE DISREGARD and feel free to DELETE this forum question.

No answers yet. Maybe you can help?

Tags
Data Source TreeList
Asked by
George
Top achievements
Rank 3
Bronze
Bronze
Iron
Share this question
or