System.Web.UI.HtmlControls Namespace HtmlTableRowCollection Class
Removes the table row at the specified index from the Rows collection.
[ VB ]
Public Sub RemoveAt ( _
ByVal index As Integer _
)
[ C# ]
public void RemoveAt (
int index
);
[ C++ ]
public: void RemoveAt (
int index
);
[ JScript ]
public function RemoveAt (
index : int
);
- index
- The index of the table row to be removed.
Use this method to remove the HtmlTableRow at the specified index from an HtmlTableRowCollection.
Remember that the index number is zero-based; therefore, the first item in the collection has an index value of 0.
NOTE: An ArgumentOutOfRangeException is raised if you specify an index that is outside the range of index values in the collection.
The following example demonstrates how to use the RemoveAt method to remove the last row from the HtmlTableRowCollection.
myTable.Rows.RemoveAt ( myTable.Rows.Count - 1 );
Show me
HtmlTableRowCollection Members Rows.Remove Rows.Clear