listObj.updateTableRow Method


listObj.updateTableRow(primaryKeyOrRowNumber, data [,options]);



The primary key value or row number (zero based) of the row you want to update. If this argument is a string then it is assumed to be a primary key value. If it is a number, then it is assumed to be a row number. The primary key of the List is specified in the List.

dataJSON Object

An object with the values in the List that you want to set.

optionsJSON Object

An object with optional settings. The options object can contain the properties listed:


true/false - If true, then focus will be given to the target row. The default for this property is false.


Updates data in a row in a List that has a Detail View.

//create a data object with values for the columns in the List you want to edit
var data = {};
data.FIRSTNAME = 'Cecelia';
data.LASTNAME = 'Longwood';

//specify the primary key of the row to update
var primaryKey = '1234';

//define optional settings
var ops = {};
ops.setFocusToTargetRow = true;

//get a pointer to the List control and then call the .updateTableRow() method
var listObj = {dialog.object}.getControl('CUSTOMERLIST')

if (listObj) {

Contrast the .updateTableRow() method with the List object's .updateRow() method.

The .updateTableRow() method is the programmatic equivalent of the user entering some values into the List Detail view controls and then clicking on the Save button to save their changes back to the List. When the user does this, the List becomes dirty and the edits that have been made to the List can be synchronized with the server.

The .updateRow() method is a low level method that updates the data in a row, but this method does not add the necessary information to the List to cause the List row that was edited to become dirty. It does also not add the ._oldData object to the List to store the original values that were in the List row before it was edited. The changes that were made to the List cannot be synchronized with the server.

To programmatically add a table row see the [.addTableRow()] method.


List Control with Detail View Part

See Also