hi does anyone know how to display selected row from a datagridview to another form that records will be in textboxes..

this is what i do,
on the MopGrid_RowHeaderMouseClick

Dim MOPIDV As Integer = Nothing
        Dim i As Integer
        i = Me.MOPGrid.CurrentRow.Index
        Me.lbmopid.Text = MOPGrid.Item(0, i).Value.ToString
        Me.txtStockCode.Text = MOPGrid.Item(3, i).Value.ToString
        Me.txtMOPCurrent.Text = MOPGrid.Item(4, i).Value.ToString
        Me.txttarget.Text = MOPGrid.Item(5, i).Value.ToString
        Me.txtcomments.Text = MOPGrid.Item(8, i).Value.ToString
        Me.Date1.Value = MOPGrid.Item(7, i).Value
        Me.cmdadd.Visible = False
        Me.CBOStockcode.Visible = False
        Me.cmdSave.Visible = True

        StockIDV = MOPGrid.Item(3, i).Value.ToString
  End Sub

hope this helps

thanks i already solved this problem of mine hehe

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.