| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples Document Layout Tutorials Text Flow Tutorials Visual Glossaries SharpPlot Reference SharpPlot Class SharpPlot Properties SharpPlot Methods SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpLeaf Tutorials > Table Tutorials > Filling cells of a Table Filling cells of a TableThe Table class provides simple methods to input data into table cells. tb = new Table(); // Append along current row tb.AddRowCells("Title"); tb.AddRowCells(new string[]{"Column 1","Column 2","Column 3"}); // Jump to next row, pointing at column 1 tb.NextRow(1); // Append column from current cell and move on to original row on next column tb.AddColumns(new string[]{"Row 1","Row 2","Row 3","Row 4"}); // Append rows from current cell, and move on to orignal column on next row tb.AddRows(new int[][]{new int[]{101,201,301},new int[]{102,202,302}}); // Jump after the last row that is not empty from column 2 on (no-op here) tb.NextEmptyRow(2); // Append another row tb.AddRows(new string[]{"N/A","N/A","N/A"}); // Jump after the last row that is not empty from column 1 on (that is completely empty) tb.NextEmptyRow(1); // Append a new row title tb.AddRowCells("Totals"); // Append the new row's data tb.AddRowCells(new int[] {103,403,603}); lf.IncludeTable(tb); // Take frame width by default See also ...Table Tutorials | SharpLeaf.IncludeTable Method | Table Members |