messages.commands Object

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

Example

<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>

messages.commands.canceledit String (default: "Cancel")

Defines the text of the "Cancel" button that discards the changes during editing.

Example

<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 }
  ],
  columns: [ "name", "age", { command: [ "edit" ] } ],
  editable: true,
  messages: {
    commands: {
      canceledit: "Discard"
    }
  }
});
</script>

messages.commands.create String (default: "Add new record")

Defines the text of the "Add new record" button that adds new data rows.

Example

<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" ],
  columns: [ "name", "age" ],
  editable: true,
  messages: {
    commands: {
      create: "Add new"
    }
  }
});
</script>

messages.commands.createchild String (default: "Add child record")

Defines the text of the "Add child record" button that adds new child data rows.

Example

<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" ],
  columns: [ "name", "age", { command: [ "createchild" ] } ],
  editable: true,
  messages: {
    commands: {
      createchild: "Add child item"
    }
  }
});
</script>

messages.commands.destroy String (default: "Delete")

Defines the text of the "Delete" button that deletes a data row.

Example

<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 }
  ],
  columns: [ "name", "age", { command: [ "destroy" ] } ],
  editable: true,
  messages: {
    commands: {
      destroy: "Remove"
    }
  }
});
</script>

messages.commands.edit String (default: "Edit")

Defines the text of the "Edit" button that shows the editable fields for the row.

Example

<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 }
  ],
  columns: [ "name", "age", { command: [ "edit" ] } ],
  editable: true,
  messages: {
    commands: {
      edit: "Modify"
    }
  }
});
</script>

messages.commands.save String (default: "Save Changes")

Defines the text of the "Save Changes" button that saves modifed data rows.

Example

<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" ],
  columns: [ "name", "age" ],
  editable: true,
  messages: {
    commands: {
      save: "Save data"
    }
  }
});
</script>

messages.commands.cancel String (default: "Cancel Changes")

Defines the text of the "Cancel Changes" button that cancels all data modifications.

Example

<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" ],
  columns: [ "name", "age" ],
  editable: true,
  messages: {
    commands: {
      save: "Reject changes"
    }
  }
});
</script>

messages.commands.excel String (default: "Export to Excel")

Defines the text of the "Export to Excel" button that exports the widget data in spreadsheet format.

Example

<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: [ "excel" ],
  columns: [ "name", "age" ],
  messages: {
    commands: {
      excel: "Export to XLSX"
    }
  }
});
</script>

messages.commands.pdf String (default: "Export to PDF")

Defines the text of the "Export to PDF" button that exports the widget data in PDF format.

Example

<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: [ "pdf" ],
  columns: [ "name", "age" ],
  messages: {
    commands: {
      pdf: "Export data to PDF"
    }
  }
});
</script>

messages.commands.update String (default: "Update")

Defines the text of the "Update" button that applies the changes during editing.

Example

<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" ],
  columns: [ "name", "age", { command: [ "edit" ] } ],
  editable: true,
  messages: {
    commands: {
      update: "Save"
    }
  }
});
</script>
In this article
Not finding the help you need?