dataSpriteCssClassField String (default: null)

Sets the field of the data item that provides the sprite CSS class of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Example

<style>
  #treeview .k-sprite {
    background-image: url("https://demos.telerik.com/kendo-ui/content/web/treeview/coloricons-sprite.png");
  }

  .folder { background-position: 0 -16px; }
  .html { background-position: 0 -48px; }
</style>

<div id="treeview"></div>
<script>
var items = [
  { text: "assets", sprite: "folder" },
  { text: "index.html", sprite: "html" }
];
$("#treeview").kendoTreeView({
  dataSpriteCssClassField: "sprite",
  dataSource: items
});
</script>
In this article
Not finding the help you need?