Skip to main content

XRTableCell.NextCell Property

Gets the cell following the given cell in a table row.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

[Browsable(false)]
public XRTableCell NextCell { get; }

Property Value

Type Description
XRTableCell

An XRTableCell object representing the next cell in a row.

Remarks

If the index of the given cell has the highest value in the collection of cells in the row, then the NextCell property returns null (Nothing in Visual Basic).

Example

The following method deletes columns adjacent to the column containing the base cell. Access to the cells adjacent to the base cell is implemented via the XRTableCell.PreviousCell and XRTableCell.NextCell properties.

using DevExpress.XtraReports.UI;
// ...

public void DeleteAdjacentColumns(XRTable table, XRTableCell baseCell) {

   if(baseCell.PreviousCell != null)
      // Delete a column containing the cell that is previous to the base cell.
      table.DeleteColumn(baseCell.PreviousCell);

   if(baseCell.NextCell != null)
      // Delete a column containing the cell that is next to the base cell.
      table.DeleteColumn(baseCell.NextCell); 
}
See Also