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

Table.ForEachRow(TableRowProcessorDelegate) Method

Enables you to specify a delegate which will be executed for each row of a table.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v18.2.Core.dll


void ForEachRow(
    TableRowProcessorDelegate cellProcessor


Name Type Description
cellProcessor TableRowProcessorDelegate

A TableRowProcessorDelegate delegate.


The following code snippet paints the third column with a light cyan color.

    Dim table As Table = document.Tables.Create(document.Range.Start, 3, 10)
    'Change cell background color and vertical alignment in the third column.
    table.ForEachRow(New TableRowProcessorDelegate(AddressOf ChangeColumnAppearanceHelper.ChangeColumnColor))
Private Class ChangeColumnAppearanceHelper
    Public Shared Sub ChangeColumnColor(ByVal row As TableRow, ByVal rowIndex As Integer)
        row(2).BackgroundColor = System.Drawing.Color.LightCyan
        row(2).VerticalAlignment = TableCellVerticalAlignment.Center
    End Sub
End Class
See Also