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

Hi,
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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.