A newer version of this page is available. Switch to the current version.

XRTableRowCollection.LastRow Property

Gets the last row in the collection of table rows.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll


public XRTableRow LastRow { get; }
Public ReadOnly Property LastRow As XRTableRow

Property Value

Type Description

An XRTableRow object occupying the lowest position in the table.


The last row in the collection of table rows is always located in the lowest position in the table.


The following code demonstrates different ways of inserting cells and columns into an XRTable control. The original table contains one column. The second column is created by adding two individual cells using the XRTableRow.InsertCell method. The third and fourth columns are added by the XRTable.InsertColumnToRight and XRTable.InsertColumnToLeft methods, correspondingly.

using System.Drawing;
using DevExpress.XtraReports.UI;
// ...

public XRTable CreateTable() {
// Create an XRTable object containing two rows and one column.
    XRTable tab = XRTable.CreateTable(new Rectangle(200, 10, 200, 120), 2, 1);

    // Set the visible borders and their width for each table cell.
    tab.Borders = DevExpress.XtraPrinting.BorderSide.All;
    tab.BorderWidth = 2;

    // Create new cells.
    XRTableCell cell0 = new XRTableCell();
    XRTableCell cell1 = new XRTableCell();

    // Insert the new cells into the appropriate rows.
    tab.Rows.FirstRow.InsertCell(cell0, 0);
    tab.Rows.LastRow.InsertCell(cell1, 0);
    // The table has two columns now.

    // Insert a column to the right of the first row cell.
    // The table has three columns now.

    // Insert a column to the left of the second row cell.
    // The table has four columns now.

    return tab;
See Also