public Column(Table table, string header, int id) { Field headerFld; _table = table; _id = id; if (header.Trim() != ""){ headerFld = _table.Fields[this, 0]; headerFld.Value = header; headerFld.IsHeader = true; } }
public Table Add(Table table) { _tables.Add(table); return table; }
public Columns(Table table) { _table = table; }
public Rows(Table table) { _table = table; }
public Row(Table table, int id) { _id = id; _table = table; Field[] flds = _table.Fields[this]; for(int i=0; i<flds.Length; i++){ flds[i].Value = ""; //Blank row } }
public Row(Table table, string[] vals, int id) { _id = id; _table = table; Field[] flds = _table.Fields[this]; for(int i=0; i<vals.Length; i++){ flds[i].Value = vals[i]; } }
/*public string[] PrintText{ get{ //TODO: This isn't done. I might can be used to shink the width of a report to make it fit on a page. int colWidth; string rowString = ""; ArrayList printText = new ArrayList(); foreach(Sheet sheet in _sheets){ foreach(Table table in sheet.Tables){ colWidth = (93 / table.Columns.Count) - Table.COLUMN_PAD; foreach(Row row in table.Rows){ foreach(Field fld in row.Fields){ if (fld.Value.Length > colWidth) fldVal = fld.Value.Substring(1, colWidth); else fldVal = fld.Value.PadRight( //rowString = fld.Value.Substring(1, colWidth) + " ".PadRight(Table.COLUMN_PAD); //printText.Add(rowString); } } } return (string[])printText.ToArray(); } }*/ protected Table CreateDefaultTable(string title, params string[] columnHeaders) { Table table; Sheet sheet; if (_sheets[0] == null){ sheet = new Sheet(this,title); _sheets.Add(sheet); table = new Table(sheet, title, columnHeaders); sheet.Add(table); }else{ table = _sheets[0][0]; } return table; }
public Fields(Table table) { _table = table; }
public Field(Table table, int row, int col) { _table = table; _column = _table.Columns[col]; _row = _table.AddRow(); }
public Field(Table table, int row, Column col) { _table = table; _row = _table.Rows[row]; if (_row == null) _row = _table.AddRow(); _column = col; }
public Field(Table table, Row row, Column col) { _table = table; _row = row; _column = col; }
public Table Add(Table table) { List.Add(table); return table; }