/// <summary> /// Set body of cell at specified position of grid /// </summary> /// <param name="row">number of row</param> /// <param name="col">number of column</param> /// <param name="body">body to be set</param> public void SetCellBody(int row, int col, ICellBody body) { if (row < 0) { throw new ArgumentOutOfRangeException("row"); } if (row >= this.cells.RowCapacity) { throw new ArgumentOutOfRangeException("row"); } if (col < 0) { throw new ArgumentOutOfRangeException("col"); } if (col >= this.cells.ColCapacity) { throw new ArgumentOutOfRangeException("col"); } var cell = this.cells[row, col]; if (cell == null) { if (body == null) { return; } else { cell = CreateCell(row, col); } } SetCellBody(cell, body); }
public void SetCellBody(string address, ICellBody body) { if (!CellPosition.IsValidAddress(address)) { throw new InvalidAddressException(address); } this.SetCellBody(new CellPosition(address), body); }
/// <summary> /// Set body of cell into specified row /// </summary> /// <param name="cell">cell to be set</param> /// <param name="body">body to be set</param> internal void SetCellBody(Cell cell, ICellBody body) { cell.Body = body; //if (body != null) //{ // body.OnSetup(cell); // // why? // UpdateCellFont(cell); //} //cell.UpdateContentBounds(); RequestInvalidate(); }
public void SetCellBody(CellPosition pos, ICellBody body) { pos = this.FixPos(pos); this.SetCellBody(pos.Row, pos.Col, body); }
/// <summary> /// Set body of cell into specified row /// </summary> /// <param name="cell">cell to be set</param> /// <param name="body">body to be set</param> internal void SetCellBody(Cell cell, ICellBody body) { cell.Body = body; RequestInvalidate(); }