User Guide
1098 Chapter 9: WDDX JavaScript Objects
// Extend the record set by 3 rows
rs.addRows(3);
// Set an element in the first row
// newValue is a previously defined variable
rs.setField(0, "NewColumn", newValue);
getField
Description
Returns the element in the specified row/column position.
Syntax
object.getField( row, col )
Parameters
Return value
Returns the value in the specified row/column position.
Usage
Call this function to access a value in a WDDX record set.
Example
This example calls the getField function (the variable r is a reference to a WddxRecordset
instance):
for (row = 0; row < nRows; ++row)
{
o += "<tr>";
for (i = 0; i < colNames.length; ++i)
{
o += "<td>" + r.getField(row, colNames[i]) + "</td>";
}
o += "</tr>";
}
getRowCount
Description
Indicates the number of rows in a WddxRecordset instance.
Syntax
object.getRowCount( )
Parameter Description
object Instance name of the WddxRecordset object
row Integer; zero-based row number of the value to return
col Integer or string; column of the value to be returned.