execute

Fires when a command is executed.

Example

<div id="taskBoard"></div>

<script>
  $("#taskBoard").kendoTaskBoard({
    dataOrderField: "order",
    dataSource: [
      { id: 1, order: 1, title: "Task 1", description: "Description 1", status: "backlog", category: "red" },
      { id: 2, order: 2, title: "Task 11", description: "Description 11", status: "backlog", category: "red" },
      { id: 3, order: 3, title: "Task 2", description: "Description 2", status: "doing", category: "green" },
      { id: 4, order: 4, title: "Task 22", description: "Description 22", status: "doing", category: "green" },
      { id: 5, order: 5, title: "Task 3", description: "Description 3", status: "done", category: "blue" }
    ],
    columns: [
      { text: "Backlog", status: "backlog" },
      { text: "Doing", status: "doing" },
      { text: "Done", status: "done" }
    ],
    execute: function (ev) {
      // Prevent Select command
      if(ev.command === "SelectCardCommand") {
        ev.preventDefault();
      } else {
        // Notify all others
        alert(ev.command + " executed!");
      } 
    }
  });
</script>

Event Data

e.sender kendo.ui.TaskBoard

The widget instance which fired the event.

e.command String

The command name to be executed.

e.options Object

The options to be passed in the command. Possible fields included are card and column data items, card and column elements and string value passed to the command.

e.preventDefault Function

If invoked prevents the command execution.

In this article
Not finding the help you need? Improve this article