Kendo UI for Angular:排序、分组和虚拟滚动
Kendo UI for Angular: Sorting, Grouping and Virtual Scrolling
我正在尝试同时使用所有 3 个功能。对于排序,这是用于对数据进行排序的内容:
this.gridView = {
data: orderBy(this.products, this.sort),
total: this.products.length
};
分组使用的是:
this.gridView = process(products, { group: this.groups });
而且,对于虚拟滚动,这是使用的:
this.gridView = {
data: this.data.slice(this.skip, this.skip + this.pageSize),
total: this.data.length
};
如何同时使用所有 3 个?当我为分组添加代码时,它会破坏分组。如果我单击列 header 进行排序,它认为我想拖动列 header。当为排序添加代码时,虚拟滚动停止工作。使用所有 3 个功能时,调用哪个函数有优先顺序吗?
我能够找到我需要做的事情。对于任何其他想要使用所有查询功能的人,只需使用此 属性 绑定:
[kendoGridBinding]="gridData"
这将处理分组、分页、排序和过滤。通过使用 kendoGridBinding 指令,网格将为您处理一切。
我正在尝试同时使用所有 3 个功能。对于排序,这是用于对数据进行排序的内容:
this.gridView = {
data: orderBy(this.products, this.sort),
total: this.products.length
};
分组使用的是:
this.gridView = process(products, { group: this.groups });
而且,对于虚拟滚动,这是使用的:
this.gridView = {
data: this.data.slice(this.skip, this.skip + this.pageSize),
total: this.data.length
};
如何同时使用所有 3 个?当我为分组添加代码时,它会破坏分组。如果我单击列 header 进行排序,它认为我想拖动列 header。当为排序添加代码时,虚拟滚动停止工作。使用所有 3 个功能时,调用哪个函数有优先顺序吗?
我能够找到我需要做的事情。对于任何其他想要使用所有查询功能的人,只需使用此 属性 绑定:
[kendoGridBinding]="gridData"
这将处理分组、分页、排序和过滤。通过使用 kendoGridBinding 指令,网格将为您处理一切。