|
I am trying to select a row in a DataGrid by simply clicking on the row (any column in the row) which will in turn open a new form with various controls which are binded to the original record which was selected in the DataGrid.
I have the following code which selects the whole row when clicked
Private Sub DataGridComplaints_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridComplaints.MouseUp
Dim pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = DataGridComplaints.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
DataGridComplaints.CurrentCell = New DataGridCell(hti.Row, hti.Column)
DataGridComplaints.Select(hti.Row)
End If
End Sub
How do I use a column in the selected row to pass information into a variable which can then be used on the next form?
Many thanks for any help you can give me.
|
|
|
|
|
|
|
// |