public List <ColumnHierarchy> GetAllDataColumns() { if (_allDataColumns == null) { var columnNames = ColumnHierarchy.GetAllItems(). Where(r => !string.IsNullOrEmpty(r.ColumnName) && ColumnsDic.ContainsKey(r.ColumnName)); _allDataColumns = columnNames.Where(r => !(ColumnsDic[r.ColumnName].IsCrossColumn)).ToList(); } return(_allDataColumns); }
protected virtual void InitializeColumns() { ColumnsInitialized = true; //InitializeConcatenateColumns(); _columnsDic = Columns.ToDictionary(c => c.ColumnName); foreach (var column in Columns) { column.DetectIsCrossColumn(Journal, ""); } foreach (var columnTemplate in GetColumnTemplates()) { if (!ColumnsDic.ContainsKey(columnTemplate.ColumnName)) { throw new Exception("Not found template.ColumnName in columns"); } ColumnsDic[columnTemplate.ColumnName].TemplateColumn = columnTemplate; } EnsureColumnsInitialized(); }