Hi!
I have two forms. First form where user can put data in (via datagrid) and send it into the sql-server second form that has a datagridview that gets it data from a stored procedure. I did everything with the wizard and drag and drop.
Now, after making changes in the first form (using the save button in the menustrip) i want the DGV in the other form get updated. I am reading and searching the whole day so i know i have to unbind the datasource and rebind it. I tried the following things that didnt work for me :
AND
can anyone help me getting the dgv populated with the updated data from my sql-server.
Thanks in advance!
p.s.: i work with vb.net, vs 2012 and ms sql server
I have two forms. First form where user can put data in (via datagrid) and send it into the sql-server second form that has a datagridview that gets it data from a stored procedure. I did everything with the wizard and drag and drop.
Now, after making changes in the first form (using the save button in the menustrip) i want the DGV in the other form get updated. I am reading and searching the whole day so i know i have to unbind the datasource and rebind it. I tried the following things that didnt work for me :
Code:
form1.DataSet.Datatable.Clear()
form1.Tableadapter.fill(datatable)
form1.datagridview.datasource = form1.datatableCode:
form1.bindingsource.datasource = nothing
form1.bindingsource.datasource = form1.tableadapter.getdata()
form1.bindinsource.resetbindings(false)Thanks in advance!
p.s.: i work with vb.net, vs 2012 and ms sql server