Ok I'm stumped now... I'm working on a vb.net app using the datagrid control that is bound to a dataset. I'm able to populate the datagrid with no problems... what I want to do now is have the user select a row in the datagrid that issues a sql select statement based on the row that is selected to populate another form.
the code that I am using to get the row # is as follows:
how would I format the sql select statement to get me the row # that I am wanting? the database that I am using is MS Access, not MSSQL. Any insight or help would be greatly appreciated!
the code that I am using to get the row # is as follows:
Code:
Private Sub DataGrid1_MouseUp(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles DataGrid1.MouseUp
Dim pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = Me.DataGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
MessageBox.Show(DataGrid1(hti.Row, hti.Column).ToString())
Else
If hti.Type = DataGrid.HitTestType.RowHeader Then
MessageBox.Show(hti.Row)
End If
End If
End Sub
how would I format the sql select statement to get me the row # that I am wanting? the database that I am using is MS Access, not MSSQL. Any insight or help would be greatly appreciated!