KendoUI Grid - Delete confirmation
HTML
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<table id='one'>
</table>
<br>
<table id='two'>
</table>
CSS
th {color:white; background:grey}
JavaScript
var dataOne = [{
a: 1,
b: 1},
{
a: 2,
b: 4},
{
a: 3,
b: 9}];
var dataTwo = dataOne.slice(0);
$('#one').kendoGrid({
dataSource: dataOne,
columns: [{
field: 'a'},
{
field: 'b'},
{
command: 'destroy'}]
,
editable:{confirmation:function (e)
{
$("<div id="confirmBtn"</div>).on("click", function () {
kendo.confirm("Are you sure that you want to proceed?").then(function () {
kendo.alert("You chose the Ok action.");
}, function () {
kendo.alert("You chose to Cancel action.");
});
});
}
});
$('#two').kendoGrid({
dataSource: dataTwo,
columns: [{
field: 'a'},
{
command: 'destroy'}]
,editable:true
});