private void DrawCells(FRPaintEventArgs e, DrawCellProc proc) { float top = 0; for (int y = 0; y < Rows.Count; y++) { float left = 0; float height = Rows[y].Height; for (int x = 0; x < Columns.Count; x++) { TableCell cell = this[x, y]; float width = Columns[x].Width; cell.Left = left; cell.Top = top; if (!IsInsideSpan(cell) && (!IsPrinting || cell.Printable)) { cell.SetPrinting(IsPrinting); proc(e, cell); } left += width; } top += height; } }
private void DrawCellsRtl(FRPaintEventArgs e, DrawCellProc proc) { float top = 0; for (int y = 0; y < Rows.Count; y++) { float left = 0; float height = Rows[y].Height; //bool thereIsColSpan = false; //for (int i = Columns.Count - 1; i >= 0; i--) //{ // TableCell cell = this[i, y]; // if (cell.ColSpan > 1) // { // thereIsColSpan = true; // } //} for (int x = Columns.Count - 1; x >= 0; x--) { TableCell cell = this[x, y]; bool thereIsColSpan = false; if (cell.ColSpan > 1) { thereIsColSpan = true; } float width = Columns[x].Width; //if (thereIsColSpan) //{ // width *= cell.ColSpan - 1; // left -= width; //} if (!IsInsideSpan(cell) && (!IsPrinting || cell.Printable)) { cell.Left = left; cell.Top = top; cell.SetPrinting(IsPrinting); proc(e, cell); if (thereIsColSpan) { width *= cell.ColSpan; } left += width; } //if (!thereIsColSpan) // left += width; //else // left -= width; } top += height; } }