pageable.alwaysVisible Boolean (default: true)

(Available as of the Kendo UI 2017 R3 release) By default, the TreeList will render a pager even when total number of items in the DataSource is less than the pageSize value.

If set to false the TreeList will toggle the pager visibility as follows:

  • When the total amount of items initially set in the DataSource is less than the pageSize number, the pager will be hidden.
  • When the total amount of items initially set in the DataSource is greater than or equal to the pageSize number, the pager will be shown.
  • When the total amount of items in the DataSource becomes less than the pageSize number (after a delete or filter operation, or upon changing the pageSize), the pager will be hidden.
  • When the total amount of items in the DataSource becomes greater than or equal to the pageSize number (after an insert or filter operation, or upon changing the pageSize), the pager will be shown.

Example - hiding the pager if the total number of items is less than the pageSize value

<div id="treeList"></div>
<script>
    $("#treeList").kendoTreeList({
        columns: [
          { field: "id" },
          { field: "name" }
        ],
        dataSource: {
            data: [
              { id: 1, parentId: null, name: "item 1" },
              { id: 2, parentId: 1, name: "item 2" },
              { id: 3, parentId: 1, name: "item 3" },
              { id: 4, parentId: 1, name: "item 4" },
            ]
        },
        pageable: {
            pageSize: 10,
            alwaysVisible: false
        }
    });
</script>
In this article