Skip to main content
All docs
V25.2
  • Table.GetActiveCells(TableTraversalOrder) Method

    Returns all active cells in the table, skipping merged cells that do not display data.

    Namespace: DevExpress.Docs.Presentation

    Assembly: DevExpress.Docs.Presentation.v25.2.dll

    NuGet Package: DevExpress.Docs.Presentation

    Declaration

    public IEnumerable<TableCell> GetActiveCells(
        TableTraversalOrder order
    )

    Parameters

    Name Type Description
    order TableTraversalOrder

    The order in which to traverse the table cells.

    Returns

    Type Description
    IEnumerable<TableCell>

    A collection of table cells.

    Remarks

    If you merge two cells, both of those cells remain in the internal table structure. One becomes the resulting cell (takes the space of two and displays data). Another disappears from the table (the object remains in case you split the merged cell back into two).

    To obtain all cells that display data, call Table.GetActiveCells. This method skips cells that only exist in the internal structure and do not display data. If you traverse cells manually, you can identify these inactive cells by checking if IsMergedVertically or IsMergedHorizontally is true.

    The following code snippet iterates through all active cells in a table and obtains a list of 8 cells:

    DevExpress Presentation API - Get Actual Cells example

    using DevExpress.Docs.Presentation;
    
        IEnumerable<TableCell> tableCells = table.GetActiveCells(TableTraversalOrder.RowThenColumn);
    
    See Also