Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

TreeList - how to remove all rows

$
0
0
Hello Dave,

Please take a look at this Telerik Dojo which shows how to clear a datasource, which in turn clears all rows.  

The method I used was .setDataSource, and I set data to an empty array:
//Clear DataSource
$("#btnClear").click(function() {
var treelist = $("#treelist").data("kendoTreeList");

//empty datasource
var emptyDataSource = new kendo.data.DataSource({
  data: []
});

//setting the datasource of the treelist
treelist.setDataSource(emptyDataSource); 
});
 
Hopefully, this helps.

Regards,
Patrick
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 

Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>