messages.commands Object

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

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      cancel: "Cancel changes",
      canceledit: "Cancel",
      create: "Add new record",
      destroy: "Delete",
      edit: "Edit",
      save: "Save changes",
      select: "Select",
      update: "Update"
    }
  }
});
</script>

messages.commands.cancel String

Defines the text of the "Cancel Changes" button located in the toolbar of the widget.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      cancel: "Cancel changes"
    }
  }
});
</script>

messages.commands.canceledit String

Defines the text of the "Cancel" button that is rendered in inline or popup editing mode.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      canceledit: "Cancel"
    }
  }
});
</script>

messages.commands.create String

Defines the text of the "Add new record" button located in the toolbar of the widget.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      create: "Add new record"
    }
  }
});
</script>

messages.commands.destroy String

Defines the text of the "Delete" button rendered in inline or popup editing mode.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      destroy: "Delete"
    }
  }
});
</script>

messages.commands.edit String

Defines the text of the "Edit" button that is rendered in inline or popup editing mode.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      edit: "Edit"
    }
  }
});
</script>

messages.commands.excel String

Defines the text of the "Export to Excel" button of the grid toolbar.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  toolbar: [ "excel" ],
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  messages: {
    commands: {
      excel: "Excel export"
    }
  }
});
</script>

messages.commands.save String

Defines the text of the "Save Changes" button located in the toolbar of the widget.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      save: "Save changes"
    }
  }
});
</script>

messages.commands.update String

Defines the text of the "Update" button that is rendered in inline or popup editing mode.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: ["edit", "destroy"] }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  toolbar: ["create", "save", "cancel"],
  messages: {
    commands: {
      update: "Update"
    }
  }
});
</script>
In this article
Not finding the help you need?