what is the best way to translate a particular column value (integer in this case) to an image? So for example, if the col value is 1, the image displayed in the col is image1.png, if the col value is 2, the image displayed in the col is image2.png, etc.
Thanks in advance
What you would do is write a class that implements IComparer and assign it to the image column. The Compare method will pass you two cells and you from there you can get the corresponding value cells from the same rows and compare their values.
I forgot to mention... using the background image technique with a column style of Image allows sorting to be based on the integer value of each cell in the column. The integer is still the value of the cell, you just can't see it.
Another possibility is to set the background image of the cell to the image you want. I am currently doing this with a column that is defined as an integer. I set the column style to an image, which hides the text. Then in the InitializeRow event you can set the background image for each cell in your image column. Take a look at this post. Mike helped me work through it. http://forums.infragistics.com/forums/t/38404.aspx
How do you get the new unbound column to sort based on the value that generated the image?
If yuo want to just show an image in the cell and not show the value, then what I would do is use the grid's InitializeLayout event to hide the column with the numbers in it and add an unbound column with a DataType of Bitmap.
Then you can use the InitializeRow event to examine the value in the hidden column and get set the value on the image column to the image you want.