Insert Row in Kendo Grid

1 Answer 3941 Views
Grid
Farzana
Top achievements
Rank 1
Farzana asked on 08 Jan 2016, 08:52 PM
I doing an angular implementation of the Kendo Grid and need to be able to insert rows in addition to the in-built Add/Update Row features. The data is read from the server and in sync whenever any changes are made on the client-side. How do I implement the insert row capability in Kendo Grid?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 12 Jan 2016, 12:11 PM
Hi Farzana,

You can use the addRow method of the Grid to insert an empty record ready for editing or the add method of the DataSource to insert new data item with pre-defined values. If you want to save the changes you should call the sync method of the DataSource.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Farzana
Top achievements
Rank 1
commented on 12 Jan 2016, 04:49 PM

I need to be able to insert the row at a specific index in the grid so when a user selects a row and clicks Insert, it should display an empty editable row at that index in the grid which will sync up with the backend to save the changes. Is there an example I could take a look at which demonstrates this scenario?

Thanks.

Alexander Valchev
Telerik team
commented on 14 Jan 2016, 11:56 AM

Hello Farzana,

In such case you should use the insert method of the DataSource which gives you the ability to insert a record at a specific index. See this example: http://dojo.telerik.com/oTUWe

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Farzana
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or