Grid Class Properties

The properties in this section are described in alphabetical order.

Description

Use this property to set or return a String representing the free form style (or styles) for the grid as previously set by this property.

This property is read-write.

Note: Styles for this grid set in Application Designer are not accessible through the FreeFormStyleName property.

Important! Use this property within fluid applications only.

Example

PTS_SRCH.PTS_RIGHTPNEL_RSLT.FreeFormStyleName = "psc_margin-left2em";

Description

If a grid column name is used as a property, it accesses the grid column with that name. This means the following code:

&Mycolumn = &MyGrid.gridcolumnname;

acts the same as

&Mycolumn = &MyGrid.GetColumn(columnname);

This property is read-only.

Description

This property returns a string specifying the label that appears as the title of the grid.

Note: You can't use this property to set labels longer than 100 characters. If you try to set a label of more than 100 characters, the label is truncated to 100 characters. Always put any changes to labels in the Activate event. This way the label is set every time the page is accessed.

This property is read-write.

Description

Use this property to set or return an Integer representing the grid layout type. The value can be one of the following constants:

Numeric Value

Constant Value

Description

0

%OriginalGrid

Not used in fluid applications.

1

%ScrollableGrid

Not used in fluid applications.

2

%ListGrid 

Used on fluid pages to contain an unordered list grid.

3

%DataGrid

Used on fluid pages to contain a data grid.

4

%DivGrid

Used on fluid pages to contain a div grid.

5

%OriginalFlexGrid

Used on fluid pages to contain a flex grid.

6

%ClassicListGrid

Not used in fluid applications.

7

%ClassicOrderedListGrid

Not used in fluid applications.

8

%ClassicPresenationGrid

Not used in fluid applications.

9

%OrderedListGrid

Used on fluid pages to contain an ordered list grid.

10

%MenuGrid

Used on fluid pages as a container for a pop-up menu.

See Creating Fluid Pop-up Menus.

11

%TabSetGrid

Used on fluid pages as a container for sectional tabs.

See Creating Sectional Tabs on a Page.

This property is read-write.

Important! Use this property within fluid applications only.

Example

Local Grid &LGrid = GetGrid(Page.QE_NUI_GRIDLAYOUT, "PCODEGRID");
Local string &Devicetype;

&Devicetype = %Request.BrowserDeviceType;

Evaluate &Devicetype
When "pc"
   If %Request.BrowserTypeClass = "chrome" Then
      &LGrid.Layout = %DataGrid;
   Else
      &LGrid.Layout = %DivGrid;
   End-If;
When "phone"
   &LGrid.Layout = %OriginalFlexGrid;
When "tablet"
   &LGrid.Layout = %ListGrid;
End-Evaluate;

Description

Use this property to set or return a Boolean value specifying the persistent search property for this grid. This corresponds to the "Persist In Menu" option for the grid that can be set in Application Designer. When this property is True, the most recent transaction search is stored and the search results are accessible through the drop-down navigation menu structure.

This property is read-write.

Example

&MyGrid = GetGrid(Page.GRIDCHECK, "GRIDNO");
&MyGrid.PersistMenuOption = True;

MessageBox(0, "", 0, 0, "Persist In Menu = " | &MyGrid.PersistMenuOption);

Description

Use this property to set or return a Boolean value indicating whether row highlighting has been enabled or disabled for the grid.

By default, when a grid has more than one row, and an end user hovers the mouse over a row or selects the row, the system highlights that row to indicate it is the row of current focus. However, this can be distracting or unnecessary for some interfaces for varying reasons, such as the number of rows in the grid, the form factor of the device displaying the page, and so on.

This property is read-write.

Example

In the following example, the first grid’s row highlighting behavior is enabled; the second grid’s row highlighting behavior is disabled.

*Within a page’s Activate event */

Local Grid &MYGRID1;
Local Grid &MYGRID2;

&MYGRID1 = GetGrid(Page.USER_SELF_SERVICE, "PSUSEREMAIL");
&MYGRID1.RowHighlight = True;


&MYGRID2 = GetGrid(Page.USER_SELF_SERVICE, "MCF_IM_XMPP_CFG");
&MYGRID2.RowHighlight = False;

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 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;

Description

Use this property to set or return a string representing the summary text for the grid.

Summary text enables you to provide a brief description of the functionality and content of the grid area. This property is pertinent for users who access the application in screen reader mode.

This property is read-write.

Example

&MyGrid = GetGrid(Page.PSXLATMAINT, "PSXITMMNT_VW");
&MyGrid.SummaryText = "This is the new summary text through PeopleCode";