Skip to main content

TableCellProcessorDelegate Delegate

A delegate intended to invoke its method for each cell in a table.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

[ComVisible(true)]
public delegate void TableCellProcessorDelegate(
    TableCell cell,
    int rowIndex,
    int cellIndex
);

Parameters

Name Type Description
cell TableCell

A TableCell object that is the cell for which the delegate is executed.

rowIndex Int32

An integer that is the index of a row to which the cell belongs.

cellIndex Int32

An integer that is the index of a column to which the cell belongs.

Remarks

Use the Table.ForEachCell method to employ the TableCellProcessorDelegate instance.

Tip

You can also use anonymous methods as delegates.

Example

using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;

void IterateCells(Table _table) {
    _table.BeginUpdate();
    _table.ForEachCell(new TableCellProcessorDelegate(MakeMultiplicationCell));
    _table.EndUpdate();
}

void MakeMultiplicationCell(TableCell cell, int i, int j)
{
    richEditControl1.Document.InsertText(cell.Range.Start,
        String.Format("{0}*{1} = {2}", i+2, j+2, (i+2) * (j+2)));
}
See Also