Disclaimer: My career has been in embedded software, and I've just recently gotten into desktop applications. The application I'm developing has a simulation that produces a sparse 2-D matrix that can be on the order of 3000x3000 elements. The sparse matrix object comes from a class we created in house. I have a requirement to display this sparse matrix in its expanded form to the user.
I initially expanded it into a DataTable and bound it to a DataGridView but had obstacles with the sum total of column FillWeights exceeding a limit. Even overcoming that, it takes several minutes of processing before anything is displayed in the table.
I came across the DataGridView's virtual mode. Virtual Mode seem very well suited for what I have, but there are still several issues:
- There doesn't seem to be a way to convey to the DataGridView the maximum number of rows and/or columns (for purposes of scaling the scroll bars). If I set .RowCount and/or .ColumnCount, the application hangs for 2 minutes for creating the columns.
- I lose column sorting in Virtual Mode. There seems to be some way to do it in the MSDN documentation, but it's not apparent.
This leads me to believe data in the GUI world isn't meant to be viewed in big unwieldy tables (specifically with thousands of columns), especially given that we've already got it in a sparse matrix form. I think I need to push back on the requirement.
What would you do in my situation?