Hi Maciek,
Thanks for the update. We have checked your query. We have prepared a sample based on your requirements, where we have loaded the grid initially with some data(OrderInfoCollection). In the button click we have
1. Cleared the collection and inserted a new item,
2. Inserted a new item directly
In both the cases, we were not able to replicate the issue and the data is updated both in OrderInfoCollection (record collection) and in SfDataGrid (UI). We have attached the sample which we tested for your reference and you can download the same from the below link.
However, if you have enabled sorting, and if your issue is that the inserted record is not ordered based on sorting, then you should set the SfDataGrid.View.LiveDataUpdateMode property to AllowDataShaping, so that the record would get updated in the UI.
Refer the below code example to update sorting for newly added record.
dataGrid.GridViewCreated += DataGrid_GridViewCreated; private void DataGrid_GridViewCreated(object sender, GridViewCreatedEventArgs e) { dataGrid.View.LiveDataUpdateMode = LiveDataUpdateMode.AllowDataShaping } |
In case if the issue still persists at your end, please revert us the with a sample replicating the issue to proceed further.
Regards,
Pavithra S