/// <summary> /// Initializes a new instance of the <see cref="DataFile"/> class. /// </summary> public DataFile() { rootColumn = new DataColumn(); columns = new List<DataColumn>(); rows = new List<DataRow>(); Reset(); }
/// <summary> /// Adds a column with the specified header name and column width. /// </summary> /// <param name="name">The header name.</param> /// <param name="width">The column width.</param> public void AddColumn(string name = "", short width = DEFAULT_COLUMN_WIDTH) { DataColumn column = new DataColumn(); column.Name = name; column.Width = width; columns.Add(column); rows.ForEach(row => { row.AddColumn(); }); }