torsdag den 11. september 2008

Traverse grid records

If you want to traverse the records in a grid, the methods you should use are methods getFirst() and getNext() on the form datasource.

Traversing through the active records in a grid can often be useful, either for computing totals or changing the value of fields.

A form datasource has two methods getFirst() and getNext(), which enable you to traverse through the records in a grid. If you only want to traverse the selected methods in the grid, you should use getFirst(true);

Example:

for ( custTrans = CustTrans_DS.getFirst(); custTrans; custTrans = CustTrans_ds.getNext() )
{
totalAmountMST += custTrans.AmountMST;
}

Ingen kommentarer: