asp.net.ph

HtmlTableCellCollection.Remove Method

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
);

Parameters

cell
The table cell to remove from the collection.

Remarks

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.

Example

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 

See Also

HtmlTableCellCollection Members   Cells.RemoveAt   Cells.Clear Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph