I populate the datatable with the values of TABLE1 from the database, these are then displayed in the datagridview "grid" i then reset the datatable and repopulate with the values of TABLE2 from the database. i now try to display these new values in the grid but i cannot see the rows, only the column headers (Column1, Column2, Column3 etc)
if i click on one of the column headers the rows then appear. does anyone know how to make these rows appear without having to click the grid
if i click on one of the column headers the rows then appear. does anyone know how to make these rows appear without having to click the grid
VB.NET:
Dim queryAdapter As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM table1", connection)
Dim ds As DataSet = New DataSet()
Dim dt As DataTable = New DataTable()
Dim datatable2 As DataTable = New DataTable()
ds.Tables.Add(dt)
queryAdapter.Fill(dt)
grid1.DataSource = dt
MsgBox("")
queryAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM table2", connection)
dt.Reset()
queryAdapter.Fill(dt)
grid1.DataSource = dt