423,682 Members | 1,622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,682 IT Pros & Developers. It's quick & easy.

Automatic DataGridView "refresh"?

P: 29
Hi
In Form1 I have a Datagridview showing the content of a table from DataBase.

In Form2 I add or modify a row in that table. So, when I get back to Form1 I would want the DataGridView get updated automatically.

To populate the DGV I use a Linq To Sql query:
Expand|Select|Wrap|Line Numbers
  1. Dim Query = From .....
  2. Me.DGV.DataSource = Query
  3.  
or

Expand|Select|Wrap|Line Numbers
  1. Dim Query = From .....
  2. Me.BindingSource1.DataSource = Query
  3. Me.DGV.DataSource = Me.BindingSource1 
  4.  
I have been trying to use:
BindSource (as DataGridView.DataSource)
BindingSource.ResetBinding(False)
DGV.Refresh()
etc...

Also, I added a new row in the same Fomr1 and nothing happens.

Thanks for advance !!!
Feb 16 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.