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

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
 
A

Ashutosh Bhawasinka

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.
 
O

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!

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top