Search code examples
angularkendo-ui-angular2

How do I add a new row at the bottom of the grid? Kendo UI Angular 2/4


I'm attempting to add a new row when clicking on "Add New". Please take the example in: Kendo UI for Angular. Is there an option like Jquery with "createAt" or do we have to do some DOM manipulation? Please advise and thanks in advance.


Solution

  • Actually you can change some implementation down there, if you really need this to be done, it will add your row to the bottom. On your products.service.ts change this line of code in save method

    this.data.splice(0, 0, product);
    

    to

    this.data.push(product);
    

    and all will work as you wanted.