Click here to Skip to main content
14,930,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a winForm that has a dataGridView bound to a BindingList that's on a worker thread. I populate my bindingList via an eventHandler that pushes me approx 5 messages per/sec...

For some reason my dataGrid is VERY slow and consuming too much cpu resources (20%)...

I've "tried" to implement the dataGridView in virtualMode but I can't get it working properly...I've got it loading property but it only refreshes if I click or scroll
Posted
Comments
taha6221 19-Jan-13 16:38pm
   
you may populate it with a very large amount of rows,so you have to follow one of these rows :
1- if you hide the datagridview when binding data and then show it when it is done, makes is a bit faster
2-you have to use a DATAREADER to to read the data and Must use "READNEXTVALUE". this works when it is in backgrounderworker and also you can add a progress bar to show the status of the grid,IMP > don't forget to use thread.sleep(100); in "while" cycle you use to read the values of the datareader;
3-also you can make a "QUEUE" class for the messeges to come inside and handle them in "INVOKE" method.

hope it helps ;)

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