For some reason the delete dialog is firing twice. It doesn't call the destroy function until after you go through both dialogs.
Any ideas?
Any ideas?
001.
<
div
id
=
"grid"
></
div
>
002.
003.
<
script
>
004.
$(document).ready(function() {
005.
var crudServiceBaseUrl = "main.php?a=quotereport", dataSource = new kendo.data.DataSource({
006.
transport : {
007.
read : {
008.
url : crudServiceBaseUrl + "&read=1",
009.
dataType : "json"
010.
},
011.
destroy : {
012.
url : crudServiceBaseUrl + "&destroy=1",
013.
dataType : "json"
014.
},
015.
parameterMap : function(options, operation) {
016.
if (operation !== "read" && options.models) {
017.
return {
018.
models : kendo.stringify(options.models)
019.
};
020.
}
021.
}
022.
},
023.
batch : true,
024.
schema : {
025.
data: "data",
026.
total: "total",
027.
model : {
028.
id : "id",
029.
fields : {
030.
id: {
031.
validation : {
032.
required : true
033.
}},
034.
first_name: {
035.
validation : {
036.
required : true
037.
}},
038.
last_name: {
039.
validation : {
040.
required : true
041.
}},
042.
dob: {
043.
validation : {
044.
required : true
045.
}},
046.
email: {
047.
validation : {
048.
required : true
049.
}},
050.
phone: {
051.
validation : {
052.
required : true
053.
}},
054.
age: {
055.
validation : {
056.
required : true
057.
}},
058.
date: {
059.
validation : {
060.
required : true
061.
}}
062.
}
063.
}
064.
}
065.
});
066.
067.
$("#grid").kendoGrid({
068.
dataSource : dataSource,
069.
pageable : false,
070.
height : 430,
071.
editable: 'inline',
072.
columns : [{
073.
field : "id",
074.
title : "ID"
075.
}, {
076.
field : "date",
077.
title : "Date"
078.
}, {
079.
field : "first_name",
080.
title : "First Name"
081.
}, {
082.
field : "last_name",
083.
title : "Age"
084.
}, {
085.
field : "dob",
086.
title : "Birthday"
087.
}, {
088.
field : "email",
089.
title : "Email"
090.
}, {
091.
field : "phone",
092.
title : "Telephone"
093.
}, {
094.
field : "age",
095.
title : "Age"
096.
},
097.
{
098.
command : ["destroy"],
099.
title : " ",
100.
width : "160px"
101.
}]
102.
});
103.
104.
});
105.
</
script
>