P
Patrick Sullivan
I'm trying to make a list bring up (select) its list item that corresponds
to a selected cell in a datagrid. The items are strings that should be
identical. The grid and the list are from different tables, not related.
Private Sub synch()
Dim thisCell As New DataGridCell
thisCell.ColumnNumber = 1
thisCell.RowNumber = datagrid1.CurrentCell.RowNumber
Dim index As Integer
index = combobox1.FindString(thisCell.ToString)
combobox1.SelectedIndex = index
End Sub
What I get is just a blank selection in the comboxbox's textbox. The grid
cell is in column 2, but does that mean I should use 1? I mean, are these
grid tables zero based? I tried both ways, same result. I will see what I
can find with the debugger, but meanwhile, TIA. I think I was doing this or
something even more complicated a year or two ago, but now it's much later.
to a selected cell in a datagrid. The items are strings that should be
identical. The grid and the list are from different tables, not related.
Private Sub synch()
Dim thisCell As New DataGridCell
thisCell.ColumnNumber = 1
thisCell.RowNumber = datagrid1.CurrentCell.RowNumber
Dim index As Integer
index = combobox1.FindString(thisCell.ToString)
combobox1.SelectedIndex = index
End Sub
What I get is just a blank selection in the comboxbox's textbox. The grid
cell is in column 2, but does that mean I should use 1? I mean, are these
grid tables zero based? I tried both ways, same result. I will see what I
can find with the debugger, but meanwhile, TIA. I think I was doing this or
something even more complicated a year or two ago, but now it's much later.