Hi,
I have a value in a database which is an integer and I want to display an image in the grid instead of the value.
I'm sure there must be a simple way of doing this but I am currently at a loss having beaten my head against a brick wall for the last hour or so.
Any help greatly appreciated.
RegardsGraham Wade
Hi Graham,
I'm pretty sure there are several topics on the forums about this. Here's one with some sample code:
Adding an image column to UltraGrid - Infragistics Community
In your case, you will want to hide the "real" column with the integers in it and then check the Value of the that column inside InitializeRow to determine which image to use.
Thanks Mike that was just what I was looking for. Just not the way I had thought it would work and so I was looking for the wrong thing when searching the forums before posting.
This is not the only way to do it, there are certainly other approaches you could take.
For example, you could attach a ValueList to the Integer column and the ValueList could map the integer values to the images. This is a little trickier to set up, but the advantage is that the field can be edited by the user - they can drop down the list and pick a new image.