Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have about 1.000.000 datarows, i load them fastly to a dataset using bufferstream and threading...

now to load the 'dataset' in a 'datagridview' by a very fastmethod : How to do ?

thank's for any help
Posted

To make a large data set work with the DataGridView, you need to put it into virtual mode. 'Large' in this case means over about 10,000, in my experience.

Start your research here[^].
 
Share this answer
 
Comments
Richard MacCutchan 22-Aug-11 12:07pm    
I'm mainly C++, and I knew this worked in ListView, I should have Binged for the DGV version.
Dr.Walt Fair, PE 22-Aug-11 12:18pm    
Good hint. Thanks.
In a word DON'T.
You should never need that many rows in your view as it will just mean that your poor user will have to sit twiddling his or her thumbs for hours while your view tries to refresh itself. Use the input information from the user to select the appropriate records from the database (based on the size of the visible portion of your view) and put those in the dataset. When the user needs to see some different data you repeat that operation. you can improve the performance even further by running your database accesses in a background thread.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900