Kendo Tree Tree Method

Kendo added a new API method called expandPathin its treeView in Q3 2013 . Unfortunately, I cannot find documentation about this in the Kendo UI Docs or its forums.

Has anyone used this method? The sample will be wonderful.

+4
source share
1 answer

Well, it allows you to extend the path and provide a callback that is called after all nodes have been expanded:

var tree = $("#treeview").kendoTreeView({
    dataSource: [{
        id: 0,
        text: "Furniture",
        items: [{
            id: 1,
            text: "Tables & Chairs"
        }, {
            id: 2,
            text: "Sofas"
        }, {
            id: 3,
            text: "Occasional Furniture",
            items: [{
                id: 8,
                text: "Small Sofas"
            }, {
                id: 9,
                text: "Tiny Sofas",
                items: [{
                    id: 10,
                    text: "Small Tiny Sofas"
                }, {
                    id: 11,
                    text: "Smallest Tiny Sofas"
                }]

            }]
        }]
    }, {
        id: 4,
        text: "Decor",
        items: [{
            id: 5,
            text: "Bed Linen"
        }, {
            id: 6,
            text: "Curtains & Blinds"
        }, {
            id: 7,
            text: "Carpets"
        }]
    }]
}).data().kendoTreeView;

tree.expandPath([0, 3, 9], function() {
    console.log("hello");
});

node , ( , ). - ( ), , , , ( , , , node - node ).

(. )

+2

All Articles