selectable Boolean|String (default: false)

If set to true the user would be able to select treelist rows. By default selection is disabled.

Can also be set to the following string values:

  • "row" - the user can select a single row.
  • "cell" - the user can select a single cell.
  • "multiple, row" - the user can select multiple rows.
  • "multiple, cell" - the user can select multiple cells.

Example - set selectable as a boolean

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    selectable: true,
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22 },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ]
  });
</script>

Example - set selectable as a string

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    selectable: "multiple, row",
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22 },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ]
  });
</script>
In this article
Not finding the help you need?