问题
I have set image to a cell and i have to remove at some point of time.
//Code
'Get the first cell of the first column in the grid
UltraGridCell = UltraGridRow.Cells(UltraGridColumn.Index)
If (UltraGridColumn.Hidden = False) Then
'Set the cell image
UltraGridCell.Appearance.Image = My.Resources.Tran_comment_161
UltraGridCell.Appearance.ImageHAlign = HAlign.Right
UltraGridCell.Appearance.ImageVAlign = VAlign.Top
Exit For
Else
'Code to remove the image from the cell
End If
How can i do this?
回答1:
Just try with
cell.Appearance.ResetImage()
Practically there is a ResetXXXX
method for every Appearance
property of the cell, or you could Reset everything to the default values calling the general method
cell.Appearance.Reset()
来源:https://stackoverflow.com/questions/16583718/remove-image-in-a-cell-of-ultragrid