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
235
Performance of Grid when binding to realtime data sources.
posted

Hello,

I'm trying to create a simple real-time application with the grid control.

Currently our data source is an observable collection of objects that implement INotifyPropertyChanged. It consists of a grid of 1000 rows and 20 columns, where every single value in the data source is updated every 500ms. This means that there are 40,000 updates every second to the data source.

xamDataGrid will lazy subscribe to each row as it appears on screen, however it never unsubscribes, meaning that once you have viewed every row, the grid makes 40,000 calls a second to the dataset to get the data rather than the 400 or so of the cells actually on screen.

Is it possible to somehow setup the grid so that it only actively subscribes to the data that is onscreen at that time? Any suggestions appreciated.

Thanks
Steve Mortimer

Parents
No Data
Reply
  • 4850
    Offline posted

    Hi Steve,

    Even though we subscribe to records not in view, I don't understand how it is accessing the data for cells not in view, unless you have set the RecordContainerGenerationMode property to 'PreLoad' or 'LazyLoad' since internally we call CellValuePresenter.FromRecordAndCell and only re-get the cell's value if it returns a non-null value. For RecordContainerGenerationMode 'Recycle' (which is the default) or 'Virtualize' that should only apply to records in view plus possibly a small # of buffered records in the 'Virtualize' case.

Children