Images in datagridview
#1

i am trying to get images in a column in a datagridview but i cant get it.

 

this is my line to add a row in datagridview:

dataGridView1.Rows.Add("String", (Image)GetEmpty(), - 1, "None", -1);

and this is my GetEmpty() function:

private Bitmap GetEmpty()
{
Bitmap bmp = new Bitmap("Images/Empty.png");
return bmp;
}

but when i run my program and click on an item from a listbox, i get this:

 

2

 

Could anyone help me please?

 

Thanks in advance.



Messages In This Thread
[No subject] - by soryjero - 08-16-2013, 12:11 PM
[No subject] - by someone - 08-16-2013, 03:55 PM
[No subject] - by soryjero - 08-16-2013, 11:56 PM
[No subject] - by Johnny5 - 08-17-2013, 10:02 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)