This is a migrated thread and some comments may be shown as answers.

After calling addRow how to get the just added row?

1 Answer 662 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jiatang
Top achievements
Rank 1
Jiatang asked on 08 Apr 2016, 03:55 AM

After calling the addRow, I want to have a way to get that row. Both the html jQuery object and the dataItem.

We cannot assume that the added new row is always at top or bottom. If you have ever sorted the gird, the added row may be in the middle.

The best way is having the addRow method return the jQuery object.

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 11 Apr 2016, 11:17 AM

Hello Jiatang,

My suggestion is to use the add method of the Kendo UI DataSource, which returns the data item. If the item is rendered as a table row you can find the table row element by using the data-uid attribute. Same data-uid value is applied to the data item and the table row element. 

Regards,
Boyan Dimitrov
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
Jiatang
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or