Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

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.v20.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

void ForEachRow(
    TableRowProcessorDelegate cellProcessor
)

Parameters

Name Type Description
cellProcessor TableRowProcessorDelegate

A TableRowProcessorDelegate delegate.

Remarks

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

    Table table = document.Tables.Create(document.Range.Start, 3, 10);
    table.BeginUpdate();
    //Change cell background color and vertical alignment in the third column.
    table.ForEachRow(new TableRowProcessorDelegate(ChangeColumnAppearanceHelper.ChangeColumnColor));
    table.EndUpdate();
class ChangeColumnAppearanceHelper
{
    public static void ChangeColumnColor(TableRow row, int rowIndex)
    {
        row[2].BackgroundColor = System.Drawing.Color.LightCyan;
        row[2].VerticalAlignment = TableCellVerticalAlignment.Center;
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the ForEachRow(TableRowProcessorDelegate) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also