Private Sub dtgView_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dtgView.KeyDown If e.KeyCode = Keys.Enter Then Try Dim a As Integer = 0 If dtgView.SelectedRows.Count > 0 Then txtIL_ID.Text = dtgView.Item(1, a).Value txtIL_Name.Text = dtgView.Item(3, a).Value txtIL_Desc.Text = dtgView.Item(4, a).Value txtIL_Catgry.Text = dtgView.Item(6, a).Value txtIL_Packaging.Text = dtgView.Item(8, a).Value txtIL_UnitCost.Text = dtgView.Item(15, a).Value txtIL_WE.Text = dtgView.Item(9, a).Value txtIL_RE.Text = dtgView.Item(10, a).Value txtIL_WA.Text = dtgView.Item(11, a).Value txtIL_OG.Text = dtgView.Item(12, a).Value txtIL_QTY.Text = dtgView.Item(13, a).Value 'txtIL_Supp_ID.Text = dtgView.Item(0, a).Value txtIL_ID.Select() Me.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try End If End Sub
txtIL_ID.Text = dtgView.Rows(dtgView.SelectedRows(0)).Cells(1).Value txtIL_Name.Text = dtgView.Rows(dtgView.SelectedRows(0)).Cells(3).Value txtIL_Desc.Text = dtgView.Rows(dtgView.SelectedRows(0)).Cells(4).Value ...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)