Click here to Skip to main content
13,351,243 members (66,976 online)
Rate this:
Please Sign up or sign in to vote.
Good day all!!!

I have two columns "IsTrue" and "IsTrueImage" in my DataGridView. "IsTrueImage" is a image column.

I want to set the image for the individual image cells based on the whether or not the cell value for "IsTrue" is true or false.

I'm not sure how to go about this. CellFormatting, RowPrePaint, RowPostPaint.

Thanx in advance...
Posted 13-Feb-13 22:31pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

_AKA_KSN_: I understand you like to write posts; what I don't understand is your answer to azinyama.

- When did he mention DataTemplateSelector?

"You hope he might be talking it" ??? Did you even _read_ the question? Why would he be talking about it, if he doesn't write about it?

people like you really strengthen the myth: Random Internet people just dont care.

However; and back to answering OP.

It seems that using the cellformatting event, might be the way to go.

Here's a few threads about it, Azin.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


hope you might be talking about DataTemplateSelector please follow the below link. or let me know if am wrong.[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180111.1 | Last Updated 2 Jan 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100