HtmlTableRowCollection Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A collection of HtmlTableRow objects that represent the rows of an HtmlTable control. This class cannot be inherited.
public ref class HtmlTableRowCollection sealed : System::Collections::ICollection
public sealed class HtmlTableRowCollection : System.Collections.ICollection
type HtmlTableRowCollection = class
interface ICollection
interface IEnumerable
Public NotInheritable Class HtmlTableRowCollection
Implements ICollection
- Inheritance
-
HtmlTableRowCollection
- Implements
Examples
The following code example demonstrates how to dynamically generate the contents of an HtmlTable control by adding rows to an HtmlTableRowCollection collection. Notice that the Rows property of a table is the HtmlTableRowCollection object.
<%@ Page Language="C#" AutoEventWireup="True" %>
HtmlTableRowCollection Example
<%@ Page Language="VB" AutoEventWireup="True" %>
HtmlTableRowCollection Example
Remarks
Use the HtmlTableRowCollection class to programmatically manage a collection of HtmlTableRow objects that represent the rows in an HtmlTable control. This class is commonly used to add, remove, or modify the contents of a row in an HtmlTable control.
Note
An HtmlTable control contains a Rows property that represents a collection of HtmlTableRow objects. Each HtmlTableRow represents an individual row in the table. An HtmlTableRow contains a Cells property that represents a collection of HtmlTableCell objects. These objects, in turn, represent the individual cells of the table. To retrieve an individual cell, first get the HtmlTableRow object, representing the row containing the cell, from the Rows collection of the HtmlTable control. You can then get the HtmlTableCell object, representing the cell in the row, from the Cells collection of the HtmlTableRow.
Properties
| Name | Description |
|---|---|
| Count |
Gets the number of HtmlTableRow objects in the HtmlTableRowCollection collection. |
| IsReadOnly |
Gets a value indicating whether the HtmlTableRowCollection collection is read-only. |
| IsSynchronized |
Gets a value indicating whether access to the HtmlTableRowCollection collection is synchronized (thread safe). |
| Item[Int32] |
Gets the HtmlTableRow object at the specified index from the HtmlTableRowCollection collection. |
| SyncRoot |
Gets the object that can be used to synchronize access to the HtmlTableRowCollection collection. |
Methods
| Name | Description |
|---|---|
| Add(HtmlTableRow) |
Appends the specified HtmlTableRow object to the end of the HtmlTableRowCollection collection. |
| Clear() |
Removes all HtmlTableRow objects from the HtmlTableRowCollection collection. |
| CopyTo(Array, Int32) |
Copies the items from the HtmlTableRowCollection collection to the specified Array object, starting at the specified index in the array. |
| Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
| GetEnumerator() |
Returns an IEnumerator-implemented object that contains all HtmlTableRow objects in the HtmlTableRowCollection collection. |
| GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
| GetType() |
Gets the Type of the current instance. (Inherited from Object) |
| Insert(Int32, HtmlTableRow) |
Adds an HtmlTableRow object to the specified location in the collection. |
| MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
| Remove(HtmlTableRow) |
Removes the specified HtmlTableRow object from the HtmlTableRowCollection collection. |
| RemoveAt(Int32) |
Removes the HtmlTableRow object at the specified index from the HtmlTableRowCollection collection. |
| ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Extension Methods
| Name | Description |
|---|---|
| AsParallel(IEnumerable) |
Enables parallelization of a query. |
| AsQueryable(IEnumerable) |
Converts an IEnumerable to an IQueryable. |
|
Cast |
Casts the elements of an IEnumerable to the specified type. |
|
OfType |
Filters the elements of an IEnumerable based on a specified type. |