468,247 Members | 1,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

How to force DataGridView to update itself in compliance with underlying DataSource ?

I have DataGridView which DataSource is assigned to Table<>
object of DataContext connected to SQL Server database.

But when the underlying SQL Server database is updated
(through ODBC connection) the DataGridView is not updated.

I see that Table<is updated because its Count is changed.

How to force DataGridView to update itself in such situation ?
Oleg Subachev
Nov 6 '08 #1
2 3677

Oleg Subachev wrote:
I have DataGridView which DataSource is assigned to Table<>
object of DataContext connected to SQL Server database.

But when the underlying SQL Server database is updated
(through ODBC connection) the DataGridView is not updated.

I see that Table<is updated because its Count is changed.

How to force DataGridView to update itself in such situation ?
Oleg Subachev

The table (which maybe a part of dataset) which is being used as the
data source of the DataGridView must be re-filled using the adapter's
Fill command!

When you initially did a fill for the underlying table, that table's
contents got cached in your application and after that you are working
with the cached data.

If there is some other way, I am not aware.
Nov 6 '08 #2
The table (which maybe a part of dataset) which is being used as the data
source of the DataGridView must be re-filled using the adapter's Fill
command!
The problem is that the underlying Table<is updated (its Count has
changed) but the DataGridView is not updated accordingly.
And I can't find out how to update it :-(
Oleg Subachev
Nov 7 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by michael sorens | last post: by
3 posts views Thread by Bob | last post: by
4 posts views Thread by Terry Olsen | last post: by
1 post views Thread by weird0 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.