System.Web.UI.HtmlControls Namespace
Provides access to the collection of table cells found within a row in a table.
An HtmlTable control has a Rows property that contains a collection of HtmlTableRow objects, each representing an individual row in the table.
An HtmlTableRow in turn has a Cells property that contains a collection of HtmlTableCell objects, each representing an individual cell in the row.
Use the HtmlTableCellCollection class, exposed via the HtmlTableRow.Cells collection, to programmatically manage the collection of table cell objects in a given row.
This class defines the properties and methods that enable programmatic acess to any or all items in the collection, using simple array notation.
To retrieve an individual cell, first get the HtmlTableRow that represents the row containing the cell in the table, using the HtmlTable.Rows collection. You can then get the HtmlTableCell that represents the cell in the row, using HtmlTableRow.Cells collection.
myTable.Rows [ index ].Cells [ index ]
myTable.Rows ( index ).Cells ( index ) |
|
C# |
VB |
This class is mainly used to dynamically add, remove, or modify the contents of a cell in the HtmlTableRow control.
For examples illustrating use of this control, see the individual member types of this class. For syntax information, see HtmlTable in ASP.NET Syntax for HTML Controls.
HtmlTable HtmlTableCell HtmlTableRow HtmlTableRowCollection