我正在使用 foreach 按列循环进入网格,在循环进入一列时,我必须进行验证并循环到下一个可见列,即验证并重置列单元格的图像。
//代码
For Each col In Me.TransactionsGrid.Rows.Band.Columns
If (col.Hidden = False) Then
'Get the first cell of the first column in the grid
cell= row.Cells(col.Index)
'Set the cell image
cell.Appearance.Image = My.Resources.Tran_comment_161
cell.Appearance.ImageHAlign = HAlign.Right
cell.Appearance.ImageVAlign = VAlign.Top
'Loop in to the next visible column and reset the image of the cell
//Code here
cell= row.Cells(UltraGridColumn.Index + 1)
'Reset the cell image
cell.Appearance.ResetImage()
Exit For
End If
Next
我怎样才能做到这一点?