Bonjour,
J'aimerais savoir si il est possible d'afficher une icone dans une datagridView (Autrement que en developpant un module) ?
Et comment ?
Merci
Une solution :
Mais comment faire un test sur la valeur du champ de la cellule, afin de ne mettre l'image que dans certain cas ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Private Sub Bt(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridViewFichier.CellPainting If e.Value = "txt" Then ImageList1.Draw(e.Graphics, e.CellBounds.Left, e.CellBounds.Top, 0) e.Handled = True End If End Sub
Car j'ai l'erreur :
Operator '=' not definied for Dbnull and "txt"
Partager