ClassTableRow
Class
Represents a row in the item.
Definition
Namespace:Telerik.Reporting.Processing
Assembly:Telerik.Reporting.dll
Syntax:
cs-api-definition
public sealed class TableRow
Inheritance: objectTableRow
Properties
Methods
GetCell(int)
Gets an ITableCell at the specified column index.
Declaration
cs-api-definition
public ITableCell GetCell(int columnIndex)
Parameters
columnIndex
int
Returns
An ITableCell instance.
Remarks
This method should be used after the Table item is data bound.
Example
The following code snippet demonstrates a sample usage of the GetCell method:
cs
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.TableRow row in table.Rows)
{
for (int colIndex = 0; colIndex < table.Rows.Count; colIndex++)
{
Telerik.Reporting.Processing.ITableCell cell = row.GetCell(colIndex);
if (cell.RowIndex == row.Index
&& cell.ColumnIndex == colIndex)
{
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.
}
}
}
};
vb
Private Sub TableDef_ItemDataBound3(ByVal sender As Object, ByVal e As EventArgs) Handles tableDef.ItemDataBound
Dim table As Telerik.Reporting.Processing.Table = DirectCast(sender, Telerik.Reporting.Processing.Table)
For Each row As Telerik.Reporting.Processing.TableRow In table.Rows
For colIndex As Integer = 0 To table.Rows.Count - 1
Dim cell As Telerik.Reporting.Processing.ITableCell = row.GetCell(colIndex)
If cell.RowIndex = row.Index AndAlso cell.ColumnIndex = colIndex Then
Dim item As Telerik.Reporting.Processing.ReportItem = cell.Item
' Here you can do something with the report item
Else
' Do nothing. This is part of a merged table cell
End If
Next
Next
End Sub
ToString()
Internal use only
Declaration
cs-api-definition
public override string ToString()
Returns
string
Overrides