toolbar.name String

The name of the toolbar command. Either a built-in ("cancel", "create", "save", "excel", "pdf") or custom. The name is reflected in one of the CSS classes, which is applied to the button - k-grid-name. This class can be used to obtain reference to the button after Grid initialization and attach click handlers.

Example - specify the name of the command

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  toolbar: [
    { name: "create" },
    { name: "save" },
    { name: "custom" }
  ],
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: {
    data: [
      { id: 1, name: "Jane Doe", age: 30 },
      { id: 2, name: "John Doe", age: 33 }
    ],
    schema: {
      model: { id: "id" }
    }
  },
  editable: true
});

$(".k-grid-custom").click(function(e){
    // handler body
});
</script>
In this article