Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
453
XamDataGrid: Real-Time datasource update. Need help
posted

I am using XamDataGrid bound to an ObservableCollection<RecordViewModel> in my ViewModel.
My application is subscribed to receive real time notifications of data changes (Insert/Update/Delete) and I need to reflect these changes on the datagrid.
So far I have the mechanism to add a new record to ObservableCollection, and it seem to work fine.
What I need to achieve next is have the grid show the records in the descending order so that the last one will appear on the top. I have a field "MOD_TIME" in my RecordViewModel which contains the timestamp when the record is generated/updated.
I tried adding the code in my XamDataGrid:FieldLayout Xaml


<igDataGrid:FieldLayout.SortedFields>
    <igDataGrid:FieldSortDescription Direction="Descending" FieldName="Mod_time" />
</igDataGrid:FieldLayout.SortedFields>

              
It works when I load the data from the datasource and display on the grid. But not in REAL TIME update scenario. And I think it is supposed to work only when we have all the records from datasource and datagrid is being initialized and not in real time scenario
Is there any better and more optimized approach to this? I am expecting around 1000-2500 records in the Real Time scenario during the day

 

Thx, Sagar