Traverse Grid data


I want to do something that I would think would be simple yet I am not sure how this is done. How can I traverse through the records in a grid so I can print out their details in the infolog?

Thank you!

IN DS->Execute query ()

while select DSName




Hi ,

You can traverse the selected grid records using following code(Suppose for the ProdTable)-

ProdTable prodTableRecord;
for (prodTableRecord = prodTable_DS.getFirst(1) ? prodTable_DS.getFirst(1) : ProdTable; prodTableRecord;prodTableRecord=prodTable_DS.getNext())
//Do Something what you want


Nevermind, the answer is:

void method()
Table table;

int value;

//looping the datasource

for (table = table_ds.getFirst(); table; table = table_ds.getNext())
value += table.intField;