Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
148
rated 0 times [  152] [ 4]  / answers: 1 / hits: 32583  / 12 Years ago, thu, october 4, 2012, 12:00:00

How can I check if a Kendo Grid has changes? I heard that there is a dirty property, but I cant find it.


More From » kendo-ui

 Answers
17

Added rows will have the dirty property set to true and so will updated rows. But, deleted rows are stored elsewhere (in the _destroyed collection). Pass this function the datasource of your grid to see if it has changes.



function doesDataSourceHaveChanges(ds)
{
var dirty = false;

$.each(ds._data, function ()
{
if (this.dirty == true)
{
dirty = true;
}
});

if (ds._destroyed.length > 0) dirty = true;

return dirty;
}

[#82762] Tuesday, October 2, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marissatinao

Total Points: 447
Total Questions: 90
Total Answers: 93

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;