Image in DataGridView does not show!! PLEASE HELP!

C

Claes Wedin

I have problems using DataGridViewImageColulmn:

The Image does not show (only a red X is shown).

I tried this:
- Create New WindowsForms app
- In the Form: Drag a DataGridView control to the form
- Add 2 columns and chose DataGridViewImageColulmn for one of them
- In the Properties of this column, select property Image
- Select Local resource and hit button Import
- Select a bitmap file (16x16)
- The Image from the bitmap is shown in the properties
so far everything is fine...
BUT THE IMAGE NEVER SHOW UP IN THE DataGridView!!!

I tried coding everyting with the same result..
I debugged and found that an Image is loaded in the Image property...
I tested also Express version of C#, 2 colleauges have tried
aswell...nothing helps

All with the same result...

WHAT IS WRONG???
 
C

Claes Wedin

OK, No response so I had to do my work around:

In event RowsAdded I set the cell.Value = myImage so the it works...but
default image had bin better...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top