Hello Thi Han,
Thank you for the additional details.
I would suggest using BindingList
instead of a List
, since the BindingList
implements the IBindingList
interface internally, which allows the grid to get notified for changes in the list. The approach for the first scenario is to handle the UserAddedRow
event of RadGridView
, where you can get the newly added row, save its DataBoundItem
(the custom object) to a variable, then remove the row from the grid Rows
collection and insert the saved object in your BindingList
at position 0.
The approach with the programatically adding rows is to simply create the custom object and insert it at position 0
in your BindingList.
Attached you can find a sample application.
I hope that you find this information helpful.
A bit off topic, I would like to mention that it is possible to write multiple posts in one thread, so you do not need to open a new thread for each post, i.e. you could post the additional details straight in the previous thread that you have opened
the Telerik team