나는 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
내가 어떻게 이것을 달성 할 수 있습니까?
클래스의 동일한 이름 (UltraGridColumn, UltraGridRow, UltraGridCell)을 사용하여 이러한 변수를 호출하지 마십시오. 그것은 매우 혼란 스럽습니다. 그리고 실제 코드의 문제점은 무엇입니까? – Steve
잘 작동하지만 두 번째 열에있는 루프가 현재 세 번째 열을 병렬로 반복하여 셀을 재설정해야하는 경우처럼 수정해야합니다. – iamCR
나를 이해시킨다. 모든 행을 반복해야하고 현재 행의 두 번째 열에있는 값이 유효하지 않은 경우 현재 행의 세 번째 열에있는 이미지를 다시 설정해야합니까? – Steve