System.Web.UI.HtmlControls Namespace HtmlTableCellCollection Class
Removes all table cell objects from the Cells collection of a given row.
[ VB ] Public Sub Clear ( ) [ C# ] public void Clear ( ); [ C++ ] public: void Clear ( ); [ JScript ] public function Clear ( );
Use this method to remove all HtmlTableCell objects from the Cells collection of a specified row.
This method resets the Cells.Count property to 0.
Note that while this method removes the cells from a row, it does not remove the row from the table. To remove a row from the table, use the RemoveAt method of the Rows collection.
The following example demonstrates how to use the Cells.Clear method to dynamically remove the cells from a given row, then removes the row using the Rows.RemoveAt method.
myTable.Rows [ 0 ].Cells.Clear ( ); // remove the row from the table myTable.Rows.RemoveAt ( 0 );
Show me
HtmlTableCellCollection Members Cells.Remove Cells.RemoveAt Rows.RemoveAt
© 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