16-11-19, 09:13 PM
تفضل هذا الكود كاملا و الكمال الله عز وجل :
PHP كود :
Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
DataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect
DataGridView2.ClearSelection()
For i = 0 To DataGridView2.Rows.Count - 1
If DataGridView1.CurrentRow.Cells(0).Value = DataGridView2.Rows(i).Cells(0).Value Then
DataGridView2.Rows(i).Selected = True
DataGridView2.CurrentCell = DataGridView2.Rows(i).Cells(0)
End If
Next
MsgBox(DataGridView2.CurrentRow.Cells(1).Value)
End Sub
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
