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

Get the Dirty row item of the grid

1 Answer 642 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chatra
Top achievements
Rank 1
Chatra asked on 16 Jun 2014, 08:56 PM
Hi,

When a record is added to grid ;it just adds to top of the rows in the grid by default.And we can retrieve the row item by below statement.

// returns first record in datasource of the Grid
$('#Grid').data().kendoGrid.dataSource.data()[0];  

What if I click any header column of the grid which sorts grid list  and try to add the new record and the record adds to end of list in Grid Data source then how to retrive that record which just got added to last row of the grid?

Is their a better way to retrieve the latest dirty row in the grid.

Thanks,
chatrapathi chennam

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 18 Jun 2014, 04:25 PM
Hi Chatra,

Sorting or paging does not change the order of records in the data array. Only the view is changed.
Do you use by any change server side operations like serverPaging, serverFiltering and etc? If that is the case you should sync the dataSource changes before changing the page, filter, sort or etc.

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
Chatra
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or