Question Display image or icons in cells of datagridview

aksharma

New member
Joined
Sep 12, 2015
Messages
3
Programming Experience
3-5
Hi Everyone.

I have a winform datagridview with 8 rows and 5 columns that contains number data like 1,3,9 values randomly in cells. My question is I want to show icons/images in place of this values.I have 3 images for three values stated above 1,3, and 9. I want this to be done on selection of radio btns and then when images displayed I can toggle them back with values in cells.

In short there are two radio buttons - Show Values and Show Icons
When show icons selected grid values should be replaced by their respective images.
And When Show values selected, Values are shown in place of images.

How can i do it as most of the code i saw creates new columns as image columns and then display images there.
Need vb.net code for this.

Pl. Help
 
Firstly, please don't post the same question more than once. If you had just answered my question in your other thread then I would have moved that thread, instead of you reposting and us closing the other thread.

Anyway, I would suggest that you add a column to the grid for the numbers and another for the images. You can then handle the CellValueChanged event of the grid and detect changes to the numbers and then set the image in that row. You can then hide and show the columns as required by the RadioButtons.
 
Back
Top