public IAssociationMapping <T, TElement> OtherColumn(string column_name) { if (string.IsNullOrEmpty(column_name)) { return(this); } if (!OtherColumns.Contains(column_name)) { OtherColumns.Add(column_name); } return(this); }
public RenderContext GetRenderContextFor(BaseColumn column) { string columnName; if (string.IsNullOrEmpty(CrossColumnId)) { columnName = column.ColumnName; } else { var length = ColumnHierarchy.ColumnKey.Length - Column.ColumnName.Length - CrossColumnId.Length - 1; columnName = ColumnHierarchy.ColumnKey.Substring(0, length) + column.ColumnName + "_" + CrossColumnId; } if (!OtherColumns.ContainsKey(columnName)) { throw new ArgumentException("RenderContext does not contain column with name " + columnName); } return(OtherColumns[columnName]); }