Progress® Telerik® Reporting R3 2017

TableGetCell Method

Gets an ITableCell at the specified row and column index.

Namespace:  Telerik.Reporting.Processing
Assembly:  Telerik.Reporting (in Telerik.Reporting.dll)

Syntax

public ITableCell GetCell(
	int rowIndex,
	int columnIndex
)

Parameters

rowIndex
Type: SystemInt32
columnIndex
Type: SystemInt32

Return Value

Type: ITableCell
ITableCell

Remarks

This method should be used after the Table item is data bound.

Examples

The following code snippet demonstrates a sample usage of the GetCell method:
var tableDef = new Telerik.Reporting.Table();

tableDef.ItemDataBound += delegate(object sender, EventArgs args)
{
    Telerik.Reporting.Processing.Table table = (Telerik.Reporting.Processing.Table)sender;

    for (int rowIndex = 0; rowIndex < table.Rows.Count; rowIndex++)
    {
        for (int columnIndex = 0; columnIndex < table.Columns.Count; columnIndex++)
        {
            Telerik.Reporting.Processing.ITableCell cell = table.GetCell(rowIndex, columnIndex);

            if (cell.RowIndex == rowIndex 
                && cell.ColumnIndex == columnIndex)
            {
                Telerik.Reporting.Processing.ReportItem item = cell.Item; 

                // Here you can do something with the report item
            }
            else
            {
                // Do nothing. This is part of a merged table cell.
            }
        }
    }
};

See Also