beforeEdit

Fires when the user tries to edit a data item before the editor is created. Can be used for preventing the editing depending on custom logic. The event handler function context (available through the this keyword) will be set to the component instance. The event will be fired only when the PropertyGrid is editable.

Event Data

e.model kendo.data.Model

The data item which will be edited.

e.sender kendo.ui.PropertyGrid

The component instance which fired the event.

Example - subscribing to the beforeEdit event during initialization

<div id="propertyGrid"></div>

<script>
  $("#propertyGrid").kendoPropertyGrid({
    model: {
        details: {
            title: "Title",
            price: 15
        },
        foo: "bar",
        baz: 5
    },
    width: 500,
    beforeEdit: function(e) {
      /* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("beforeEdit");

      if (!e.model.field == "title") {
        e.preventDefault();
      }
    }
  });
</script>
In this article