dataBound

Fires when the widget is bound to data from its data source. The event handler function context (available through the this keyword) will be set to the widget instance.

Event Data

e.sender kendo.ui.TreeList

The widget instance which fired the event.

Example - subscribing to the dataBound event before initialization

<div id="treeList"></div>
 <script>
    $("#treeList").kendoTreeList({
      columns: [
        { field: "Name" },
        { field: "Position" }
      ],
      dataSource: [
        { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
        { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
      ],
      dataBound: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("dataBound");
      }
    });
</script>

Example - subscribing to the dataBound event after initialization

<div id="treeList"></div>
 <script>
    function dataBound(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("dataBound");
    }
    $("#treeList").kendoTreeList({
      columns: [
        { field: "Name" },
        { field: "Position" }
      ],
      dataSource: [
        { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
        { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
      ]
    });

    var treeList = $("#treeList").data("kendoTreeList");
    treeList.bind("dataBound", dataBound);
    treeList.dataSource.fetch();
</script>
In this article