New to Kendo UI for jQuery? Start a free 30-day trial

Changing

events

Fired when the user is about to select a table row or cell.

The event will be fired only when the Grid is selectable.

Event Data

e.sender kendo.ui.Grid

The component instance which fired the event.

e.target jQuery

The target row that is about to be selected. If the Grid has checkbox selection enabled and the Select All checkbox in the header is clicked, the target is set to the checkbox element instead.

e.originalEvent event

The original JavaScript event that was fired.

<div id="grid"></div>
<script>
  $("#grid").kendoGrid({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { name: "Jane Doe", age: 30 },
      { name: "John Doe", age: 33 }
    ],
    selectable: "multiple, row",
    changing: function(e) {
      let dataItem = e.sender.dataItem(e.target);
      // Prevent the selection if the row with age = 33 is about to be selected.
      if (dataItem && dataItem.age === 33) {
          e.preventDefault();
      }
    }
  });
</script>
Not finding the help you need?
Contact Support