Answer the question
In order to leave comments, you need to log in
How to display an image in a specific cell in a datagridview?
How can I show an image in a specific cell in a datagridview?
If you do as in the code below, then the picture will be shown in each cell, but I need only in a certain one.
DataGridViewImageColumn img = new DataGridViewImageColumn();
dataGridView1.Columns.Add(img);
img.DefaultCellStyle.NullValue = null;
img.HeaderText = "";
img.Name = "img2";
img.Width = 20;
Image i = Image.FromFile("1.png");
img.Image = i;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question