HighTechTalks DotNet Forums  

.NET 2005 - DataGridView - Updating data from a different form...slow to refresh.

Dotnet Framework (WinForms Controls) microsoft.public.dotnet.framework.windowsforms.controls


Discuss .NET 2005 - DataGridView - Updating data from a different form...slow to refresh. in the Dotnet Framework (WinForms Controls) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jason7069
 
Posts: n/a

Default .NET 2005 - DataGridView - Updating data from a different form...slow to refresh. - 12-19-2007 , 02:43 PM






Hi There.

I have a strange problem. I have a standard DataGridView that
displays on a specific form. This DGV is populated via a DataTable
that is generated from a simple Access Query and works great.

I have an "Add Record" button that opens a new form that allows the
user to enter another record. Once that form has been completed, a
new entry is added to the database. However, my DGV takes several
seconds to "refresh" (I added a "Refresh" button to help me
troubleshoot) to reflect the change even though I immediately call the
"Reload" method following the add:

frmTeam team = new frmTeam(cboSports.Text);
team.ShowDialog();
LoadTeams();

The other interesting point is that I have a similar DELETE button
within the same primary form. The delete simply executes a Delete
Query and then calls the same LoadTeams() method referenced above...
this works great as the next time my DGV is rendered the deleted row
is no longer there.

I have spent numerous hours checking online, but I am sort of at a
loss. I have tried the various .Clear, .Refresh options within both
the DataTable and DataGridView but nothing seems to work.

Any ideas?

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.