I have a sample application that illustrates the problem we have with our product. We load as much data as possible into XamDataGrid (we trap InsufficientMemoryException, then stop loading the data). If we try to filter data by any column, the grid displays busy indicator and eventually crashes. LargeDataSet.zip
Hello Michael,
I have been investigating the sample project that you have provided, but I don’t believe there is really anything we can really do on our end in this case.
In the sample project, you are essentially pushing the application to its memory limitations, and just before it runs out of memory, stopping and binding the data to the XamDataGrid. At this point, I would expect that just about any operation performed on the grid will push the application over the edge and cause an OutOfMemoryException, and this is shown when trying to sort, filter, group, or otherwise.
This is not specific to the XamDataGrid either. If you replace the XamDataGrid in the sample project with a built-in WPF DataGrid element and then try to sort one of the columns when the grid loads, this operation will cause an OutOfMemoryException as well.
I must ask, is there a particular reason that you are doing this in this case? It seems like a rather bad application design to load as much data to an application as the memory would allow, as this will cause many other operations to fail.
Please let me know if you have any other questions or concerns on this matter.
We have a job engine application and the grid is being used to display rows from a log table that corresponds to a particular jobs run history (which could possibly be millions of rows) The log data for a job can be viewed while the job is running and after a job is completed. Whenever the grid is loaded our application loads as many rows of data as possible. The sample application is a simple replication of the logic we use in the log viewer.
Our root problem is filtering with large datasets. We would like for the grid to gracefully fail when it can not sort a large data. We also welcome suggests for a better solution.