We are using 2011v1.2116.
I want to be able to display an image in column in place of some data. Two examples:
1) Bit field where we have 0 or 1 instead of checkboxes we want to show no image at all OR a Comment Image.
2) Image of a Status ID/Code. So each status has an image the status Ids are just numbers like 1,2,3,4,5.
Basically I want these to act very similar to how the DropDownEditorProvider works were the value in the datasource is still the data from the table, but what is displayed is the text or in this case an image. These are not editable, but could be changed as a result of other data changes.
I was not able to find anything researching this. I may not be using the right terms or too many. Any help would be appreciated.
Thanks!
Hello Greg,My suggestion is to use the value column as a hidden one and based on her to make another templated column inside which to change image according to the values of the hidden one on initialize row event.
Although having two columns to display one columns worth of data is not ideal, I tried out what I think you were suggesting, but I am missing something.
I have a hidden column (StatusId), and my templatedatafield column (Status) that contains an image web control.
In row initialize, I am able to get the StatusId column and the Status column. But I was not able to access a row's Status cell's "Template" (it was Nothing). Instead I had to use the that cell's column's templatecontrol to get to the item template, but this did not seem to work quite right. This seemed to only alter the very last image in the grid data source and the rest are using the default image set instead.
see attached zip.