Hello,
Not much experienced with databases so I need help on refresh a row with binded datagridview.
This is my declarations:
Filling grid:
After, in program I change data in those database with native SQL commands and in other form.
When I return back to form with "my list" in datagridview remain old contents.
If I refill dataset my datagridview fall's to the first row.
Question is, can I somehow refresh a single (changed) row in datagridview through binding source that my view (position in datagridview) stay where it is and this row get actual contents from database?
How to do this?
Not much experienced with databases so I need help on refresh a row with binded datagridview.
This is my declarations:
Code:
Private WithEvents bs As BindingSource = New BindingSource()
Dim adp As Odbc.OdbcDataAdapter
Dim ds As New DataSet
Code:
cmd = New Odbc.OdbcCommand(sql, cn)
adp = New Odbc.OdbcDataAdapter(cmd)
adp.Fill(ds, "adpdataset")
bs.DataSource = ds
With DataGridView1
.DataSource = bs
.DataMember = "adpdataset"
End With
When I return back to form with "my list" in datagridview remain old contents.
If I refill dataset my datagridview fall's to the first row.
Question is, can I somehow refresh a single (changed) row in datagridview through binding source that my view (position in datagridview) stay where it is and this row get actual contents from database?
How to do this?