User Guide
WddxRecordset object 795
// create a new record set
rs = new WddxRecordset();
// add a new column
rs.addColumn("NewColumn");
// 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>";
}
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.