■ UltraGrid 클래스에서 모든 행을 탐색하는 방법을 보여준다.
▶ UltraGrid 클래스 : 모든 행 탐색하기 예제 (C#)
1 2 3 4 5 6 7 8 9 10 11 |
using Infragistics.Win.UltraWinGrid; private UltraGrid ultraGrid; ... UltraGridRow firstRow = this.ultraGrid.GetRow(ChildRow.First); TraverseAllRows(firstRow, ref rowsCount, ref groupByRowsCount); |
▶ UltraGrid 클래스 : 모든 행 탐색하기 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
using Infragistics.Win.UltraWinGrid; #region 모든 행 탐색하기 - TraverseAllRows(startUltraGridRow, regularRowCount, groupByRowCount) /// <summary> /// 모든 행 탐색하기 /// </summary> /// <param name="startUltraGridRow">시작 UltraGridRow</param> /// <param name="regularRowCount">일반 행 카운트</param> /// <param name="groupByRowCount">그룹 행 카운트</param> private void TraverseAllRows(UltraGridRow startUltraGridRow, ref int regularRowCount, ref int groupByRowCount) { UltraGridRow row = startUltraGridRow; while(row != null) { if( row is UltraGridGroupByRow) { groupByRowCount++; } else { regularRowCount++; } if(row.HasChild(false)) { TraverseAllRows(row.GetChild(ChildRow.First), ref regularRowCount, ref groupByRowCount); } row = row.GetSibling(SiblingRow.Next, true, false ); } } #endregion |