Bonjour
J'aimerai ajouter une ligne datagridview (Lié a une DataTable) en cliquant sur Entrée de son dérnière ligne
j'utilise le code suivant mais ca ne marche pas vraiment
je crois que je ne doit pas mettre ce code dans l'evnt KeyPress
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Private Sub DataGV_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles DataGItemFac.KeyPress If e.KeyChar= Chr(13) And Me.DataGV.CurrentRow.Index = Me.DataGV.RowCount - 1 Then DataTable.Rows.Add() Me.DataGV.CurrentCell = Me.DataGV.RowCount - 1 End If End Sub
Merci
Partager