0 Replies - 635 Views - Last Post: 13 August 2012 - 04:36 AM Rate Topic: -----

#1 Dexterwess  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 06-December 11

passing gridview data to text box on row select

Posted 13 August 2012 - 04:36 AM

Hello there , am trying to get the values of datagridview into the text boxes and my code is not responding when i click.
I need help here pls





 Private Sub DataGridView2_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView2.CellContentClick


        DataGridView2.Rows(e.RowIndex).Selected = True

        Dim i = DataGridView2.CurrentRow.Index

        With Form20
            .txtSup_Name.Text = DataGridView2.Item(1, i).Value.ToString()
            .txtSup_Phone.Text = DataGridView2.Item(2, i).Value.ToString()
            .txtSup_Address.Text = DataGridView2.Item(2, i).Value.ToString()

        End With




Is This A Good Question/Topic? 0
  • +

Page 1 of 1