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

Messages

configuration

Defines the text of the command buttons that are shown within the TreeList. Used primarily for localization.

messages

Object
<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22 },
      { id: 2, parentId: 1, name: "John Doe", age: 24 }
    ],
    toolbar: [ "create", "pdf", "excel" ],
    columns: [ "name", "age", { command: [ "edit", "destroy", "createchild" ] } ],
    editable: true,
    messages: {
      noRows: "No records",
      loading: "Fetching records...",
      requestFailed: "Fetching failed.",
      retry: "Reload",
      commands: {
        edit: "Modify",
        update: "Save",
        canceledit: "Discard",
        create: "Add New",
        createchild: "Add Child",
        destroy: "Remove",
        excel: "Export XSLX",
        pdf: "Export to PDF"
      }
    }
  });
</script>

Defines the text for the command buttons that are used across the widget.

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22 },
      { id: 2, parentId: 1, name: "John Doe", age: 24 }
    ],
    toolbar: [ "create", "pdf", "excel" ],
    columns: [ "name", "age", { command: [ "edit", "destroy", "createchild" ] } ],
    editable: true,
    messages: {
      commands: {
        edit: "Modify",
        update: "Save",
        canceledit: "Discard",
        create: "Add New",
        createchild: "Add Child",
        destroy: "Remove",
        excel: "Export XSLX",
        pdf: "Export to PDF"
      }
    }
  });
</script>

Defines the text of the Loading... message when the widget loads its root-level items.

Default: "Loading..."

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    dataSource: {
      transport: {
        read: {
          url: "https://demos.telerik.com/service/v2/core/EmployeeDirectory"
        }
      },
      schema: {
        model: {
          id: "EmployeeId",
          parentId: "ReportsTo",
          fields: {
            EmployeeId: { type: "number", nullable: false },
            ReportsTo: { field: "ReportsTo", nullable: true }
          }
        }
      }
    },
    columns: [
      { field: "FirstName", title: "First Name", width: 250 },
      { field: "LastName", title: "Last Name" },
      { field: "Position" }],
    editable: true,
    messages: {
      loading: "Fetching records..."
    }
  });
</script>

Defines the text of No records to display message when the widget does not show any items.

Default: "No records to display"

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    dataSource: [],
    columns: [ "name", "age" ],
    messages: {
      noRows: "No data"
    }
  });
</script>

Defines the text of Request failed message when the widget fails to load its root-level items.

Default: "Request failed."

html
    <div id="treeList"></div>
    <script>
      $("#treeList").kendoTreeList({
        dataSource: {
          transport: {
            read: {
              url: "https://example.com"
            }
          }
        },
        columns: [
          { field: "FirstName", title: "First Name", width: 250 },
          { field: "LastName", title: "Last Name" },
          { field: "Position" }],
        editable: true,
        messages: {
          requestFailed: "Fetching failed."
        }
      });
    </script>

Defines the text of Retry message for the button which triggers the reloading of the TreeList root-level items.

Default: "Retry"

html
    <div id="treeList"></div>
    <script>
      $("#treeList").kendoTreeList({
        dataSource: {
          transport: {
            read: {
              url: "https://example.com"
            }
          }
        },
        columns: [
          { field: "FirstName", title: "First Name", width: 250 },
          { field: "LastName", title: "Last Name" },
          { field: "Position" }],
        editable: true,
        messages: {
          retry: "Try again"
        }
      });
    </script>