This lesson describes code for moving forward and backward through the rows of the Customer table.
Add the Next function to tutorial.js:
function Next() { if( ! CustomerTable.moveNext() ) { CustomerTable.moveLast(); } } |
Add the Prev function to tutorial.js:
function Prev() { if( ! CustomerTable.movePrevious() ) { CustomerTable.moveFirst(); } } |
Add the following functions to main.htm:
function ClickNext() { Next(); DisplayRow(); } |
function ClickPrev() { Prev(); DisplayRow(); } |
When the form is first displayed, the controls are empty because the current position is before the first row. After the form is displayed, click Next and Previous to move through the rows of the table.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |