If I've two grid view. How can i click on a cell on the second grid view and display both data of first and second grid view

  • Thread starter Thread starter Amr_Aly
  • Start date Start date
A

Amr_Aly

Guest
Hello everybody,

I searched for two days on how to click on second grid view and display the data of both first and second grid view on the textbox and combobox but after searching i get a code to make a selection on both grid view by clicking on second one

this a code to make the selection

Private Sub DataGridView3_SelectionChanged(sender As Object, e As EventArgs) Handles DataGridView3.SelectionChanged
Dim dgv As DataGridView = DirectCast(sender, DataGridView)
Dim rowindex As Int32 = dgv.CurrentCell.RowIndex
If rowindex >= 0 AndAlso rowindex < Me.DataGridView4.Rows.Count Then
Me.DataGridView4.CurrentCell = Me.DataGridView4.Rows(rowindex).Cells(0)
End If
End Sub

Is there a code to display the data of both grid by clicking on any one of them ?

Thanks in advance.....


Regards From Amr_Aly

Continue reading...
 
Back
Top