System.Web.UI.HtmlControls Namespace HtmlTableCellCollection Class
Removes the specified table cell object from the Cells collection.
[ VB ]
Public Sub Remove ( _
ByVal cell As HtmlTableCell _
)
[ C# ]
public void Remove (
HtmlTableCell cell
);
[ C++ ]
public: void Remove (
HtmlTableCell* cell
);
[ JScript ]
public function Remove (
cell : HtmlTableCell
);
- cell
- The table cell to remove from the collection.
Use this method to remove the specified HtmlTableCell from the HtmlTableCellCollection.
If you specify an HtmlTableCell that does not exist, no item is removed from the collection.
The following example demonstrates how to use the Remove method to dyamically remove the cells from the first column of an HtmlTable.
// iterate through the rows of the table
for ( int row = 0; row <= myTable.Rows.Count - 1; row++ ) {
// get the cell object from the first column
HtmlTableCell cell = myTable.Rows [ row ].Cells [ 0 ];
// remove the cell
myTable.Rows [ row ].Cells.Remove ( cell );
}
Show me
HtmlTableCellCollection Members Cells.RemoveAt Cells.Clear