DataGridView Filter
Hello,
I'm using DataGridView to display about 50,000 records.
I've added a filter to the dataview, tried to use various implementations, but all of them work very slow (same implementation on .net 1.1 gave a much faster performance). I've tried RowFilter, RowCount, etc.
I understand that there is an option of using VirtualMode in DataGridView for a large number of records, but have found no way of filtering when using it...
Can you please direct me to the right direction of increasing the performances, or maybe tell me where am I wrong?
Thanks, Marina
Can you describe in more detail how you are implementing your filter? If you can databind to a DataTable you can use the built-in filtering that the DataTable/BindingSource has.
With virtual mode you manually provide values using CellValueNeeded. You would store your cell values in an array/collection or some other store and then manually filter the values out and update the RowCount property in the DGV.
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
Hi, Mark.
I have another question.
In visual studio 2003 I've used DataGrid binded to DataTable.
I was doing a filter of the datagrid using DataView.RowFilter with about 50,000 records. When I've converted the code to visual studio 2005 it started to work really slow and the bottleneck was the RowFilter assignment...
Any ideas?
Thanks, Marina
I'm not aware of what changes have been made in ADO.NET in this area. Can you ask on the .NET Framework Data Access and Storage forum?
-mark
Program Manager
Microsoft
This post is provided "as-is"