删除Ultragrid单元格中的图像

时间:2013-05-16 09:29:05

标签: .net vb.net infragistics ultragrid

我已将图像设置为单元格,我必须在某个时间点删除。

//代码

                   '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

我该怎么做?

1 个答案:

答案 0 :(得分:1)

试试

cell.Appearance.ResetImage()

实际上,单元格的每个ResetXXXX属性都有一个Appearance方法,或者您可以将所有内容重置为调用常规方法的默认值

cell.Appearance.Reset()