如何在网格底部添加新行? Kendo UI Angular 2/4
How do I add a new row at the bottom of the grid? Kendo UI Angular 2/4
我试图在单击 "Add New" 时添加一个新行。请以Kendo UI for Angular为例。是否有像 Jquery 和 "createAt" 这样的选项,或者我们是否必须进行一些 DOM 操作?请提前告知并感谢。
实际上你可以改变下面的一些实现,如果你真的需要这样做,它会将你的行添加到底部。
在您的 products.service.ts 中更改 save
方法中的这行代码
this.data.splice(0, 0, product);
到
this.data.push(product);
一切都会如你所愿。
我试图在单击 "Add New" 时添加一个新行。请以Kendo UI for Angular为例。是否有像 Jquery 和 "createAt" 这样的选项,或者我们是否必须进行一些 DOM 操作?请提前告知并感谢。
实际上你可以改变下面的一些实现,如果你真的需要这样做,它会将你的行添加到底部。
在您的 products.service.ts 中更改 save
方法中的这行代码
this.data.splice(0, 0, product);
到
this.data.push(product);
一切都会如你所愿。