At run-time, I am adding a DataGridView to a windows form. The final column is a DataGridViewImageColumn:
Dim InfoIconColumn As New
try this code:
Private Sub DataGridView1_CellPainting(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) _
Handles DataGridView1.CellPainting
If e.RowIndex = -1 AndAlso e.ColumnIndex = DataGridView1.Columns.Count - 1 Then
e.Paint(e.CellBounds, DataGridViewPaintParts.All And Not DataGridViewPaintParts.ContentForeground)
e.Graphics.DrawImage(IconImg, e.CellBounds)
e.Handled = True
End If
End Sub
if you have read full article for doing this check This link:
http://www.authorcode.com/add-image-on-datagridview-column-header-in-vb-net/