Hi,
I have a grid which is bound to local JavaScript array. When i modify few records and try to get list of them, by checking "dirty" flag, i get nothing. Same when i try to retrieve deleted records; grid.dataSource._destroyed is empty.
Please suggest how i may do this.
I have a grid which is bound to local JavaScript array. When i modify few records and try to get list of them, by checking "dirty" flag, i get nothing. Same when i try to retrieve deleted records; grid.dataSource._destroyed is empty.
var gridData = [ { Id: 1, PaymentDate: '1/1/2015', Amount: 100 }, { Id: 2, PaymentDate: '2/1/2015', Amount: 200 }, { Id: 3, PaymentDate: '3/1/2015', Amount: 300 }, { Id: 4, PaymentDate: '4/1/2015', Amount: 400 },];$(function() { $("#grid").kendoGrid({ dataSource: { data: gridData, schema: { model: { id: "Id", fields: { Id: { type: "number" }, PaymentDate: { type: "date" }, Amount: { type: "number" } } }, } }, editable: { mode: "inline" }, toolbar: ["create", "save", "cancel"], columns: [ { field: "Id", title: "Id", width: "150px" }, { field: "PaymentDate", title: "Payment Date", format: "{0:" + dateFormat + "}", width: "150px" }, { field: "Amount", title: "Amount", format: "{0:c}", width: "150px" }, { command: ["edit", "destroy"] } ] }); grid = $("#grid").data("kendoGrid");})function show() { var data = grid.dataSource.data(); var destroyed = grid.dataSource._destroyed; for (i = 0; i < data.length; i++) { if (data[i].dirty) { console.log(data[i].Id); } } for (i = 0; i < destroyed.length; i++) { console.log(destroyed[i].Id); }}Please suggest how i may do this.