dataIconFieldString|Array(default: null)

Sets the field of the data item that provides the icon name 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 - specify custom icon field

<div id="treeview"></div>
<script>
var items = [
  { text: "Documents", iconName: "folder" },
  { text: "Report.pdf", iconName: "file-pdf" }
];
$("#treeview").kendoTreeView({
  dataIconField: "iconName",
  dataSource: items
});
</script>

Example - specify different icon fields for different levels

<div id="treeview"></div>
<script>
var items = [
  { text: "Root", rootIcon: "folder", items: [
    { text: "Child", childIcon: "file" }
  ] }
];
$("#treeview").kendoTreeView({
  dataIconField: ["rootIcon", "childIcon"],
  dataSource: items
});
</script>
In this article
dataIconField
Not finding the help you need?
Contact Support