JavaScript

listObj.setCheckedValues Method

Syntax

listObj.setCheckedValues(array)

Arguments

arrayvalue array

An array of values corresponding to the rows to check.

Description

Takes an array of values and checks the rows with the specified values.

Discussion

The setCheckedValues() method checks the rows matching the specified values specified as an array passed to the function. Any existing checked rows are left unmodified.

It is strongly recommended that you configure the List control to return a specific value, such as the Primary key field. This can be done by configuring the List's Return value settings.

Example

var listObj = {dialog.object}.getControl('LIST1');

if (listObj) {
    var selectRows = ["ALFKI","BOLID"];

    listObj.setCheckedValues(selectRows);
}
This method is only available if Has check-box select control has been enabled.

Limitations

List Control with 'Has check-box select control' Enabled

See Also