title: How to manually set data for kendoui treelist
body: <p>I want to set the datasource for a kendoui treelist at the run time. Please check following <a href="http://dojo.telerik.com/ApOCA/3" rel="nofollow">example</a>. If I set the datasource at the design time, I am able to see the data in the control. But if I try to set the datasource at run time, I do not see the data in the control.</p>
  
  <pre><code>&lt;div id="treeList"&gt;&lt;/div&gt;
  &lt;script&gt;
    var data = [ { name: "Jane Doe" }, { name: "John Doe" }];
  
      var dataSource = new kendo.data.TreeListDataSource({
        data: [ { name: "Jane Doe" }, { name: "John Doe" }]
      });
      $("#treeList").kendoTreeList({
        columns: [
            { field: "name" },
            { command: [{ name: "edit" }] }
        ],
        editable: true
        //,dataSource: dataSource
      });
    var grid = $("#treelist").data("kendoTreeList");
    grid.setDataSource( dataSource);
    grid.dataSource = dataSource;
     grid.dataSource.read();
    grid.dataSource.data(data);
  &lt;/script&gt;
  </code></pre>