/// <summary> /// Add a new column, named explicitly /// </summary> /// <param name="propertyName">Name of the new column</param> /// <param name="configure">Configuration for the column</param> /// <returns>The original builder object</returns> /// <remarks>This method changes and returns the original builder object</remarks> public DataColumnBuilder <TViewModel> AddColumn(string propertyName, Action <ColumnBuilder> configure) { var column = new DataTableColumn() { PropertyName = propertyName, DisplayName = propertyName }; configure(new ColumnBuilder(column)); _columns.Add(column); return(this); }
/// <summary> /// Construct new <see cref="DataTableColumn"/> instance /// </summary> /// <remarks>This class is not intended to be constructed by app developers directly. Rather, they should use it as part of <see cref="DataTableBuilder{TViewModel}"/></remarks> public ColumnBuilder(DataTableColumn column) { _column = column; }