This documentation is archived and is not being maintained.

HtmlTableCellCollection Class

A collection of HtmlTableCell objects that represent the cells in a single row of an HtmlTable control. This class cannot be inherited.

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)

public ref class HtmlTableCellCollection sealed : ICollection, IEnumerable
public final class HtmlTableCellCollection implements ICollection, IEnumerable
public final class HtmlTableCellCollection implements ICollection, IEnumerable

Use the HtmlTableCellCollection class to programmatically manage a collection of HtmlTableCell objects that represent the cells of a single row in an HtmlTable control. This class is commonly used to add, remove, or modify the contents of a cell in a row of an HtmlTable control.

NoteNote

An HtmlTable control contains a Rows property that contains a collection of HtmlTableRow objects. Each HtmlTableRow object represents an individual row in the table. An HtmlTableRow object contains a Cells property that represents a collection of HtmlTableCell objects. These objects, in turn, represent the individual cells of a row. To retrieve an individual cell, first get the HtmlTableRow object that represents the row containing the cell in the table (from the Rows collection of the HtmlTable control). You can then get the HtmlTableCell object that represents the cell in the row (from the Cells collection of the HtmlTableRow object).

The following code example demonstrates how to dynamically generate the contents of an HtmlTable control by adding cells to an HtmlTableCellCollection collection. Notice that the Cells property of a row, represented by an HtmlTableRow object, is the HtmlTableCellCollection collection.

No code example is currently available or this language may not be supported.

  • AspNetHostingPermission  for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.

System.Object
  System.Web.UI.HtmlControls.HtmlTableCellCollection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: