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:
or
I have been trying to use:
BindSource (as DataGridView.Da taSource)
BindingSource.R esetBinding(Fal se)
DGV.Refresh()
etc...
Also, I added a new row in the same Fomr1 and nothing happens.
Thanks for advance !!!
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:
Code:
Dim Query = From ..... Me.DGV.DataSource = Query
Code:
Dim Query = From ..... Me.BindingSource1.DataSource = Query Me.DGV.DataSource = Me.BindingSource1
BindSource (as DataGridView.Da taSource)
BindingSource.R esetBinding(Fal se)
DGV.Refresh()
etc...
Also, I added a new row in the same Fomr1 and nothing happens.
Thanks for advance !!!