https://www.telerik.com/kendo-angular-ui/components/grid/columns/#toc-auto-generated-columns
Here Dynamically columns binding is missing:
The First time data binding correctly. The second time onwards it's not binding why?
this.gridData ---> is the Api response data
this.gridView = {enter code here
data: this.gridData,
total: this.petService.pets.length
};
答案 0 :(得分:0)
你是什么意思"第二个tume开始"? Grid应该如何更新?
如果每次新数据到达时都会更新Grid绑定的对象,Grid将相应地使用最新数据重新渲染,例如:
ngOnInit() {
this.interval = setInterval(() => {
const rnd = Math.floor(Math.random()*sampleCustomers.length);
this.gridData = sampleCustomers.slice(rnd, rnd + 10)
}, 1000);
}