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

  • Thread starter Thread starter Oleg Subachev
  • Start date Start date
O

Oleg Subachev

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
 
Oleg said:
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.
 
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
 
Back
Top