bonjour à tous
j ai un datagridview rempli avec les données et dans la premiere colonne de datagridview il y a des boutons je voudrais quand je clic sur le bouton je récupére les donées de la ligne qui correspond a ce dernier dans un autre datagridview
voila mon code
mais ca marche pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Private Sub DGV1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV1.CellContentClick Dim k As String = DGV1.CurrentCell.Value If (k = "ajouter") Then DGV2.Rows.Add(DGV1.CurrentRow.Cells(0).Value, DGV1.CurrentRow.Cells(1).Value, DGV1.CurrentRow.Cells(2).Value, DGV1.CurrentRow.Cells(3).Value, DGV1.CurrentRow.Cells(4).Value, DGV1.CurrentRow.Cells(5).Value, DGV1.CurrentRow.Cells(6).Value) End If End Sub
et merci d'avance
Partager