Selector property: Grid class

Description

Use this property to set or return the row action for a grid as it relates to the PeopleTools-generated row selector field. In brief, the row action indicates whether clicking or tapping anywhere in the row (selecting the row) is equivalent to selecting just the selector field. A “selector field” is either a radio button (for single row selection) or a check box (for multiple row selection). See Application Designer Developer’s Guide: Setting Grid Use Properties, and the Row Selection Indicator on the Use tab of the Grid Properties dialog box for more information.

This property can be used on all fluid grid types with some restrictions. In addition, setting this property on a grid that has the Row Selection Indicator set to “No Selection Indicator” has no effect.

The value of the Selector property can be one of the following constants:

Numeric Value Constant Value Description

0

%GridSelNone

Indicates that no row action is enabled. This the default value.

Note: If you have a push button or hyperlink field in the grid that includes the “Execute PC on Row/Group Click” setting (on the page field’s Use tab), this selector setting is ignored.

1

%GridSelRowAction

Indicates that selecting the row is equivalent to selecting the selector field for the row. Users can select the row, which selects the selector field (either sets a radio button to on, or toggles the state of a check box) as well as sets input focus to the selector field. Other than the visual change to the selector field, there are no additional rendering or behavioral changes. No server trip is performed upon selecting the row (or the selector field).

Note: If you have a push button or hyperlink field in the grid that includes the “Execute PC on Row/Group Click” setting (on the page field’s Use tab), this selector setting is ignored.

2

%GridSelControl

Allows you to use the grid as a dynamic collection of either radio buttons or check boxes (depending on the setting on the grid’s Use tab). The label of the selector field is set to the text value of the first visible field (edit field, long edit field, group box (and its contents), and so on) in the grid row, which is particularly important for accessibility purposes. Users can select this label, which selects the selector field (either sets a radio button to on, or toggles the state of a check box) as well as sets input focus to that field.

Unlike the %GridSelRowAction, this mode can support invoking a server trip when the row or selector field is selected. This simulates the selector field being in interactive mode. To configure this, create a push button or hyperlink as a “trigger field” in the grid. Set the “Execute PC on Row/Group Click” setting on the field’s Use tab. Then, define a FieldChange PeopleCode program on this trigger field. However, this trigger field must not be the first column in the grid, which allows this field to be automatically hidden; do not override this automatic behavior and unhide this field.

Important: This mode is supported for div grids and list grids only, not for flex grids.

This property is read/write.

Important:

Use this property within fluid applications only.

Example

&grd1.Selector = %GridSelRowAction;