public Field this[Column col, int row] { get{ foreach(Field fld in _table.Fields){ if (fld.Column.Id == col.Id && fld.Row.Id == row){ return fld; } } Field ret = new Field(_table, row, col); List.Add(ret); return ret; } }
public Field this[Column col, Row row] { get{ return this[col.Id, row.Id]; } }
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 void Add(params string[] vals) { Column col; int lstCnt; foreach(string val in vals){ lstCnt = List.Count; col = new Column(_table, val, lstCnt); List.Add(col); } }
public void Add(int numberOfColumnsWithNoHeader) { Column col; for(int i=0; i<numberOfColumnsWithNoHeader; i++){ col = new Column(_table, "", i); List.Add(col); } }