asp.net.ph

Skip Navigation Links

deleteRow Method

DHTML Methods


Deletes a specified row ( TR ) in a TABLE.

Syntax

object.deleteRow (  [ iRowIndex ] ) 
Parameters

iRowIndex Optional. The index of the row to delete. This index starts from 0 and is relative to all the rows contained inside the table, regardless of section parentage.

Return Value

No return value.

Remarks

Deleting a row directly from a TABLE, or from a TFOOT, TBODY, or THEAD element within the TABLE removes the row from the rows collection for the TABLE.

Deleting a row from the TABLE removes a row from the rows collection for the TBODY. If the row is being deleted directly from the TABLE, iRowIndex must contain the rowIndex of the TR.

If the row is being deleted from a TBODY, TFOOT, or THEAD, iRowIndex must contain the sectionRowIndex of the TR.

Example

The following example deletes the specified row ( TR ) in the TABLE.

myNewRow = document.all.myTable.deleteRow ( ) 
Applies To

TABLE, TBODY, TFOOT, THEAD

See Also

insertRow, rows, rowIndex, sectionRowIndex



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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