Remove image in a cell of Ultragrid

妖精的绣舞 提交于 2019-12-24 12:16:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!