rowPin

Fired when a row is pinned.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.dataItem kendo.data.ObservableObject

The data item of the row being pinned.

e.position String

The pin position. Either "top" or "bottom".

e.pinnedTopRows Array

The array of data items that will be pinned to the top after the operation completes.

e.pinnedBottomRows Array

The array of data items that will be pinned to the bottom after the operation completes.

e.sender kendo.ui.Grid

The widget instance which fired the event.

e.preventDefault Function

If invoked, prevents the row from being pinned.

Example - subscribe to the "rowPin" event during initialization

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  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" }
    }
  },
  pinnable: true,
  contextMenu: true,
  rowPin: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Pinning:", e.dataItem.name);
  }
});
</script>

Example - subscribe to the "rowPin" event after initialization

<div id="grid"></div>
<script>
function grid_rowPin(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log("Pinning:", e.dataItem.name);
}
$("#grid").kendoGrid({
  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" }
    }
  },
  pinnable: true,
  contextMenu: true
});
var grid = $("#grid").data("kendoGrid");
grid.bind("rowPin", grid_rowPin);
</script>
In this article
rowPin
Not finding the help you need?
Contact Support