Ejemplo n.º 1
0
 private void ResolveAllColumns(GridGroupColumn column)
 {
     if (column.Columns.Count > 0)
     {
         foreach (GridColumn subColumn in column.Columns)
         {
             _allColumns.Add(subColumn);
         }
     }
     else if (column.GroupColumns.Count > 0)
     {
         foreach (GridGroupColumn subColumn in column.GroupColumns)
         {
             ResolveAllColumns(subColumn);
         }
     }
 }
Ejemplo n.º 2
0
 // 递归获得每个分组头中包含的列数
 private void ResolveColumnCount(GridGroupColumn group, ref int columnCount)
 {
     if (group.Columns.Count > 0)
     {
         columnCount += group.Columns.Count;
     }
     else if (group.GroupColumns.Count > 0)
     {
         foreach (GridGroupColumn subGroup in group.GroupColumns)
         {
             ResolveColumnCount(subGroup, ref columnCount);
         }
     }
 }
Ejemplo n.º 3
0
 private Grid ResolveParentGrid(GridGroupColumn groupColumn)
 {
     if (groupColumn != null)
     {
         if (groupColumn.Parent is Grid)
         {
             return (Grid)groupColumn.Parent;
         }
         else
         {
             return ResolveParentGrid(groupColumn.Parent as GridGroupColumn);
         }
     }
     else
     {
         return null;
     }
 }