Edit this page

editable.confirmation Boolean |String |Function (default: true)

If set to true the grid will display a confirmation dialog when the user clicks the "destroy" command button.

Can be set to a string which will be used as the confirmation text.

Can be set to a function which will be called, passing the model instance, to return the confirmation text.

Example - disable delete confirmation

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [
     { field: "name" },
     { field: "age" },
     { command: "destroy" }
   ],
   dataSource: {
    data: [
     { id: 1, name: "Jane Doe", age: 30 },
     { id: 2, name: "John Doe", age: 33 }
    ],
    schema:{
     model: {
      id: "id",
      fields: {
        age: { type: "number"}
      }
     }
    }
   },
   editable: {
     confirmation: false
   }
});
</script>

Example - set delete confirmation text

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [
     { field: "name" },
     { field: "age" },
     { command: "destroy" }
   ],
   dataSource: {
    data: [
     { id: 1, name: "Jane Doe", age: 30 },
     { id: 2, name: "John Doe", age: 33 }
    ],
    schema:{
     model: {
      id: "id",
      fields: {
        age: { type: "number"}
      }
     }
    }
   },
   editable: {
     confirmation: "Are you sure that you want to delete this record?"
   }
});
</script>

Example - set delete confirmation as function

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [
     { field: "name" },
     { field: "age" },
     { command: "destroy" }
   ],
   dataSource: {
    data: [
     { id: 1, name: "Jane Doe", age: 30 },
     { id: 2, name: "John Doe", age: 33 }
    ],
    schema:{
     model: {
      id: "id",
      fields: {
        age: { type: "number"}
      }
     }
    }
   },
   editable: {
     confirmation: function(e) {
         return  "Are you sure that you want to delete record for " + e.name + "?";
     }
   }
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy