New to Kendo UI for jQueryStart a free 30-day trial

DataTextField

configuration

Sets the field of the data item that provides the text content 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.

dataTextField

String|Array

Default: null

<div id="treeview"></div>
<script>
var items = [
  { ProductName: "Tea", items: [
    { ProductName: "Green Tea" },
    { ProductName: "Black Tea" }
  ] },
  { ProductName: "Coffee" }
];
$("#treeview").kendoTreeView({
  dataTextField: "ProductName",
  dataSource: items
});
</script>
<div id="treeview"></div>
<script>
var items = [
  { CategoryName: "Tea", items: [
    { ProductName: "Green Tea" },
    { ProductName: "Black Tea" }
  ] },
  { CategoryName: "Coffee" }
];
$("#treeview").kendoTreeView({
  dataTextField: [ "CategoryName", "ProductName" ],
  dataSource: items
});
</script>
Not finding the help you need?
Contact Support