Kendo UI for Angular: How to find out about changes in the Kendo-Grid?

880 Views Asked by At

Is there any dirty flag in the Kendo-Grid? In the old JQuery version there was one, but in the Angular version I don't see anything like that: https://www.telerik.com/kendo-angular-ui/components/grid/

And if no, how can I get to know about changes?

2

There are 2 best solutions below

0
On

The data items has a dirty field.

        var grid = $("#grid").data("kendoGrid");
        var data = grid._data;
        $.each(data, function (index, item) {
            if(item.dirty)
            {
                // do something
                var foo = "kung";
            }
        });
0
On

As far as I know, trackBy is something you could use in that case. I guess you could find the following link helpful https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-trackby

Please make a demo if you like to see if it works for you and check more things.