J
JJ
I have a datagrid on my form that displays its data from various tables
within a specified dataset.
That all works correclty.
However, when one cell is selected prior to changed the displayed table, the
cell from the old table remains visible, infront of the new tables data...?!
I have tried 'datagrid.refresh', 'DataGrid1.DataSource = nothing' and all
sort of tricks to try and update the display, but to no avail. My code looks
like this to update the datagrid:
Private Sub PopulateGridWithTable2(ByVal Keyword As String, byVal Value as
int)
DataGrid1.DataSource = Table2
DataGrid1.Visible = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyword") = Keyword
myDataRow("Value") = Value
Table2.Rows.Add(myDataRow)
DataGrid1.Refresh()
End Sub
If anyone can help - please post a quick reply. Its driving me nuts.
within a specified dataset.
That all works correclty.
However, when one cell is selected prior to changed the displayed table, the
cell from the old table remains visible, infront of the new tables data...?!
I have tried 'datagrid.refresh', 'DataGrid1.DataSource = nothing' and all
sort of tricks to try and update the display, but to no avail. My code looks
like this to update the datagrid:
Private Sub PopulateGridWithTable2(ByVal Keyword As String, byVal Value as
int)
DataGrid1.DataSource = Table2
DataGrid1.Visible = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyword") = Keyword
myDataRow("Value") = Value
Table2.Rows.Add(myDataRow)
DataGrid1.Refresh()
End Sub
If anyone can help - please post a quick reply. Its driving me nuts.