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.refre sh', 'DataGrid1.Data Source = 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 PopulateGridWit hTable2(ByVal Keyword As String, byVal Value as
int)
DataGrid1.DataS ource = Table2
DataGrid1.Visib le = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyw ord") = Keyword
myDataRow("Valu e") = Value
Table2.Rows.Add (myDataRow)
DataGrid1.Refre sh()
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.refre sh', 'DataGrid1.Data Source = 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 PopulateGridWit hTable2(ByVal Keyword As String, byVal Value as
int)
DataGrid1.DataS ource = Table2
DataGrid1.Visib le = True
Dim myDataColumn As DataColumn
Dim myDataRow As DataRow
myDataRow = Table2.NewRow()
myDataRow("Keyw ord") = Keyword
myDataRow("Valu e") = Value
Table2.Rows.Add (myDataRow)
DataGrid1.Refre sh()
End Sub
If anyone can help - please post a quick reply. Its driving me nuts.
Comment