简体   繁体   English

Angular 的 Kendo UI:如何了解 Kendo-Grid 的变化?

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

Is there any dirty flag in the Kendo-Grid? 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/在旧的 JQuery 版本中有一个,但在 Angular 版本中我没有看到类似的东西: https ://www.telerik.com/kendo-angular-ui/components/grid/

And if no, how can I get to know about changes?如果没有,我怎样才能知道变化?

As far as I know, trackBy is something you could use in that case.据我所知, trackBy是您可以在这种情况下使用的东西。 I guess you could find the following link helpful https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-trackby我想您会发现以下链接有用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.如果您想看看它是否适合您并检查更多内容,请制作一个演示。

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";
            }
        });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM