Search code examples
datagridviewcell

Datagridview cell's background image


Is it possible to set the datagridview cell's background with an image (bitmap)?


Solution

  • Have a look at using the functions below:

    Private Sub DataGridView1_RowPostPaint(sender As Object, e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles DataGridView1.RowPostPaint
    
    End Sub
    

    OR

     Private Sub DataGridView1_CellPainting(sender As Object, e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting
    
     End Sub