Hi. My application places an image in a grid cell under certain conditions. That works great. Here's the code that sets the image:
row.Cells[variable.Name].Appearance.Image = imgimageListNoData.Images[0];
Could someone please tell me how to clear the image? When the users enters data into the cell, I'd like to show the data - not the image.
Setting the image value to null isn't working:
row.Cells[variable.Name].Appearance.Image = null;
How is this accomplished?
Thanks.
That is the way to clear the image. One possibility is that the same image is specified on an appearance higher up in the resolution hierarchy (for example, on the UltraGridColumn.CellAppearance for that cell's column), so clearing it on the cell makes no difference since they are the same.
Brian,
Thanks for the reply. Maybe I should be more specific. What happens is that the image goes away, but the data appears in the upper right corner of the cell above where the image used to be. It looks like the cell still thinks there's an image there and renders the numeric value above it.
How do you reset the cell appearance so no trace of the image is left?
Here's what it looks like on screen...