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( ! Table.moveNext() ) { Table.moveLast(); } } |
Add the Prev function to tutorial.js:
function Prev() { if( ! Table.movePrevious() ) { Table.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. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |