Beispiel #1
0
        /// <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();
        }
Beispiel #2
0
        /// <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();
            });
        }