skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Use Reports in Applications
    • System Requirements
    • Forums
    • Videos
    • Blogs
    • Submit a Ticket
    • FAQs
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now
Search all

Class TableColumn

Represents a column in the Table item.

Inheritance
System.Object
TableColumn
Namespace: Telerik.Reporting.Processing
Assembly: Telerik.Reporting.dll

Syntax

public sealed class TableColumn : IDisposable, ITableLine

Properties

Index

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

Declaration
public int Index { get; }
Property Value
System.Int32

Methods

Dispose()

Declaration
public void Dispose()

GetCell(Int32)

Gets an ITableCell at the specified row index.

Declaration
public ITableCell GetCell(int rowIndex)
Parameters
System.Int32 rowIndex

Returns
ITableCell

An ITableCell instance.

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;

    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.
            }
        }
    }
};
Private Sub TableDef_ItemDataBound2(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 column As Telerik.Reporting.Processing.TableColumn In table.Columns
        For rowIndex As Integer = 0 To table.Rows.Count - 1
            Dim cell As Telerik.Reporting.Processing.ITableCell = column.GetCell(rowIndex)

            If cell.RowIndex = rowIndex AndAlso cell.ColumnIndex = column.Index 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()

Declaration
public override string ToString()
Returns
System.String

Overrides
System.Object.ToString()
Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.