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

[Solved] Position of newly added records

3 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CS
Top achievements
Rank 2
CS asked on 24 Sep 2014, 06:03 AM
Is there a possibility to pass a position for fresh records? I currently add empty records to the top of the grid, but when I save them they end up in the last position. Is there a way that they stay at the top so I can just drop in more from the top?

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 25 Sep 2014, 11:50 AM
Hello Stefan,

I am afraid that such functionality is not supported. The problem comes from the fact that you cannot be sure in which order the data will be returned from the server. A workaround would be to add a field to the model with the date the records has been created, and the sort on the client by that field, so the newest records will appear on top.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
CS
Top achievements
Rank 2
answered on 25 Sep 2014, 12:28 PM
That would be a possibility I already tried, the problem hereby is that the input column for new records gets sorted as well and since it does not have a createdon filled it is at the bottom of the list instead of top.
0
Kiril Nikolov
Telerik team
answered on 29 Sep 2014, 07:23 AM
Hi Stefan,

I am afraid that I do not have any other solution than the one I mentioned in my previous response, as the dataSource does not support this as a built-in feature. Please evaluate again your project if you can implement a hidden filed with a date to sort on and still have the functionality that you need.

Regards,
Kiril Nikolov
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
CS
Top achievements
Rank 2
Answers by
Kiril Nikolov
Telerik team
CS
Top achievements
Rank 2
Share this question
or