Table.ForEachCell(TableCellProcessorDelegate) Method
Performs the specified action on each cell in the table.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
#Declaration
void ForEachCell(
TableCellProcessorDelegate cellProcessor
)
#Parameters
Name | Type | Description |
---|---|---|
cell |
Table |
The Table |
#Remarks
The TableCellProcessorDelegate is a delegate to a method that performs an action on the cell passed to it. Each cell is individually passed to the TableCellProcessorDelegate.
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)));
}
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ForEachCell(TableCellProcessorDelegate) 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.