In Angulars ngFor
you can use trackBy
to pass a key so that Angular doesn't reload everything but only the items really needed.
Does the kendo-grid also function that way and if not by default, is it possible to pass a key to it, too?
In Angulars ngFor
you can use trackBy
to pass a key so that Angular doesn't reload everything but only the items really needed.
Does the kendo-grid also function that way and if not by default, is it possible to pass a key to it, too?
Yes, here is the documentation link: https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-trackby
A quick example would be something like this:
<!-- template -->
<kendo-grid
[kendoGridBinding]="taskData"
[trackBy]="trackById">
trackById(index: number, item: GridItem) {
const dataItem = item.data as TaskItem;
return dataItem.id;
}