Hi Muhammad Wasim, Based on my experience, the way to achieve this is handle the CellPainting event. Here is an example. void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.ColumnIndex < 0 && e.RowIndex >= 0) { Image img = Image.FromFile(@"E:\G.jpg"); ImageList imgLst = new ImageList(); imgLst.Images.Add(img); e.Graphics.DrawImage(imgLst.Images[0], e.CellBounds.Location); e.Handled = true; } } The example will draw an image to the row header. You can resize the image in the ImageList. Use e.Graphics.DrawImage to draw the image. Wish this can help you. Sincerely, Kira Qian Please mark the replies as answers if they help and unmark if they don't.- Marked As Answer byKira QianMSFT, ModeratorMonday, August 10, 2009 1:37 AM
-
|