asp.net.ph

HtmlTableCellCollection.Clear Method

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

Remarks

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.

Example

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 

See Also

HtmlTableCellCollection Members   Cells.Remove   Cells.RemoveAt   Rows.RemoveAt 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