Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Urgent : Performence issue with selecting rows from Datagridview in windows.forms
 

Urgent : Performence issue with selecting rows from Datagridview in windows.forms


Hi,
I am showing online client list in Datagridview control, which refresh after every 1 second using timer control.
Now when I try to select anything from the Datagridview control some times it respond very slow (as i observe this may the instance when DatagridView are binded again).
How I can increase the performance for the Datagridview?
Tejaswini Prashant J  Wednesday, September 09, 2009 4:30 AM
You probably should have an analysis where has the time been spent.
For example you may have
1) fetch the online data
2) do the databinding.

Step 1 may consume most of your time, in that case, you should work on that.
For example, you may want to use a background thread to fecth the data. And rebind the datagridview only when the data is ready.

Hope this will be a little bit help.
John Chen -- See my team blog: http://blogs.msdn.com/vsdata. All my posts are provided "AS IS" with no warranties, and confer no rights.
John Chen MS  Wednesday, September 09, 2009 4:52 AM
Hi Tejaswini,

At first, I agree to John Chen MS: we need to check which part of your code costs too much time or cause the low performance. You can use a DateTime variable to trace the executing time.

Second, could you please let me know how many records are loaded to the DataGridView. If the DataGridView contains too many rows, the performance would be very low. You can implement the virtual mode to improve the performance. This is a walkthrough: http://msdn.microsoft.com/en-us/library/2b177d6d.aspx.

Let me know if this does not help.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, September 10, 2009 10:17 AM

Hi,

We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Wednesday, September 16, 2009 1:58 AM

You can use google to search for other answers

Custom Search

More Threads

• Refreshing a DataGridView on an active MDI Child form
• How to Wrap column header text in DataGrid ?
• Multiple tables data in dataGrid
• Ability to highlight, bold, italicize, or use different colors in textbox
• DataGridView - Reorder columns
• Datagridview: is there a way to remove the focus of the first row?
• How to insert null datetime into a access table
• DataGridView KeyPress Event Not Working
• Move select after Enter in DataGridView
• How to compare 2 gridviews which bind to a same table in C#?