Object: HTMLTableRowElement
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
Extends
|
HTMLElement
|
The HTMLTableRowElement object represents a <tr> element in an HTML document.
The <tr> element specifies a table row.
HTMLTableRowElement properties
Property name
|
Type
|
Description
|
Status
|
Availability
|
align
|
String
|
Specifies the horizontal alignment of the cell data.
|
writable
|
4.6 or later
|
bgColor
|
String
|
Specifies the background color for the table cell.
|
writable
|
4.6 or later
|
cells
|
HTMLCollection
|
Returns an index of the table cells contained within the table row, starting at 0.
|
read only
|
4.6 or later
|
ch
|
String
|
Specifies the alignment character for cells in a column.
|
writable
|
4.6 or later
|
chOff
|
String
|
Specifies the distance the distance between the alignment character and the first adjacent character.
|
writable
|
4.6 or later
|
rowIndex
|
int
|
Returns the index position of the row in the parent table’s HTMLTableElement.rows array.
|
read only
|
4.6 or later
|
sectionRowIndex
|
int
|
Returns the index position of the row in the parent table section’s HTMLTableSectionElement.rows array.
|
read only
|
4.6 or later
|
vAlign
|
String
|
Specifies the vertical alignment of the content within the table cell.
|
writable
|
4.6 or later
|
HTMLTableRowElement methods
Method name
|
Description
|
Availability
|
deleteCell()
|
Removes the table cell at the given index position.
|
4.6 or later
|
insertCell()
|
Inserts a new empty table cell into the row at the given index position.
|
4.6 or later
|
Method: HTMLTableRowElement.deleteCell()
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
The deleteCell() method removes the cell at the given index position in the row.
Syntax
HTMLTableRowElement.deleteCell( index )
Parameters
Parameter
|
Type
|
Description
|
index
|
int
|
The index position of the row to remove from the table.
If index has a value of -1, or is equal to the number of table cells in the row, the last table cell in the row is removed.
|
Exceptions
Exception
|
Description
|
INDEX_SIZE_ERR
|
This error is thrown if index exceeds the number of table cells in the row, or has a negative value other than -1.
|
Method: HTMLTableRowElement.insertCell()
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
The insertCell() method inserts a new empty table cell into the row at the given index position.
Syntax
HTMLTableRowElement.insertCell( index )
Parameters
Parameter
|
Type
|
Description
|
index
|
int
|
The index position at which to insert the new cell in the row.
If index has a value of -1, or is equal to the number of table cells in the row, the new row is added to the end of the table.
|
Return values
Returns the newly added table cell.
Exceptions
Exception
|
Description
|
INDEX_SIZE_ERR
|
This error is thrown if index exceeds the number of table cells in the row, or has a negative value other than -1.
|
Was this information helpful? Send us your comments.