This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

moveRow

Summary

Moves a table row to a new position.

Method of dom/Windowdom/Window

Syntax

 oTable.moveRow(/* see parameter list */);

Parameters

indexFrom

Data-type
Number

Integer that specifies the index in the rows collection of the table row that is moved. -1 Default.

indexTo

Data-type
Number

Integer that specifies where the row is moved within the rows collection. -1 Default.

Return Value

No return value

Examples

This example uses the moveRow method to exchange the first and second rows in a table when the user clicks a button.

<script type="text/javascript>
function fnMove(){
   oTable.moveRow(0,1);
}
</script>
<input type="button" value="Change Rows" onclick="fnMove()">
<table id="oTable">
<tr><td>Cell 1, Row 1</td></tr>
<tr><td>Cell 1, Row 2</td></tr>
</table>

Usage

 Use to re-order rows of tabula data.

Notes

Remarks

Rows between the indexFrom and indexTo positions in the rows collection are shifted based on the direction the row moves.

Attributions