Private Sub LoadMyGrid(ByVal TypeID As Long) Dim myConn As New OleDbConnection myConn = Provider.OleConnectDB Dim rReader As OleDbDataReader Dim dt As New DataTable Dim myCmd As New OleDbCommand("Select * From MyTable", myConn) rReader = myCmd.ExecuteReader dt.Load(rReader) With MatGrid .DataSource = dt .AutoGenerateColumns = True End With rReader.Close() myCon End Sub Private Sub MyGrid_DoubleClick(sender As Object, e As EventArgs) Handles MyGrid.DoubleClick txtName.text=MyGrid.CurrentRow.Cells(1).Value End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)