Ejemplo n.º 1
0
        public int GetLevelsCount(Dictionary <string, BaseColumn> columnsDic)
        {
            if (!IsVisibleColumn(columnsDic))
            {
                return(0);
            }
            if (Childs.Count == 0)
            {
                if (!IsEmptyColumn())
                {
                    var column = columnsDic[ColumnName];
                    if (column.IsCrossColumn)
                    {
                        return(column.BaseCrossColumnDataSource.MaxLevel);
                    }
                }

                return(HideInHeader ? 0 : 1);
            }

            return(Childs.Max(r => r.GetLevelsCount(columnsDic)) + (HideInHeader ? 0 : 1));
        }