New to Telerik Reporting? Start a free 30-day trial

Represents a column in the Table item.

Definition

Namespace:Telerik.Reporting.Processing

Assembly:Telerik.Reporting.dll

Syntax:

C#
public sealed class TableColumn

Inheritance: objectTableColumn

Properties

Gets the index of the current TableColumn in the Columns collection of the Table item.

C#
public int Index { get; }

Methods

Internal use only

C#
public void Dispose()

Gets an ITableCell at the specified row index.

C#
public ITableCell GetCell(int rowIndex)
Parameters:rowIndexint

The zero-based index of the row.

Returns:

ITableCell

An instance of ITableCell at the specified row index.

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

Example:
cs-api-definition
var tableDef = new Telerik.Reporting.Table();

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

foreach (Telerik.Reporting.Processing.TableColumn column in table.Columns)
{
for (int rowIndex = 0; rowIndex < table.Rows.Count; rowIndex++)
{
Telerik.Reporting.Processing.ITableCell cell = column.GetCell(rowIndex);

if (cell.RowIndex == rowIndex
&& cell.ColumnIndex == column.Index)
{
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.
}
}
}
};

Internal use only

C#
public override string ToString()
Returns:

string

Overrides: object.ToString()