loaded

Gets or sets the loaded flag of the TreeList. Setting the loaded flag to false allows reloading of child items.

Example

<div id="treeList"></div>
<script>
var dataSource = new kendo.data.TreeListDataSource({
    data: [
        { id: 1, name: "John Doe", parentId: null },
        { id: 2, name: "Jane Smith", parentId: 1 },
        { id: 3, name: "Bob Johnson", parentId: 1 }
    ],
    schema: {
        model: {
            id: "id",
            parentId: "parentId"
        }
    }
});

$("#treeList").kendoTreeList({
    dataSource: dataSource,
    columns: ["name"]
});

dataSource.read().then(function() {
    var rootItem = dataSource.at(0);
    
    // Check if the item is loaded
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Item loaded status:", rootItem.loaded());
    
    // Set loaded to false to allow reloading
    rootItem.loaded(false);
    
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Item loaded status after setting to false:", rootItem.loaded());
});
</script>
In this article
loaded
Not finding the help you need?
Contact Support