IsUserSorted method: Rowset class

Syntax

IsUserSorted(GridName)

Description

Use this method to determine whether a user sort has been performed on the specified grid.

A user sort is defined as a user either having clicked on a column heading on the grid or having applied a sort order on the grid’s customization page. In the case of a user sort, a sort view is created based on the sort order defined by the user. Since this sort view is for display purposes only, the underlying buffer is not sorted and remains in the non-sorted order. Four additional methods (GetFirstUserSortedRow, GetLastUserSortedRow, MapBufRowToUserSortRow, and MapUserSortRowToBufRow) enable you to interrogate this sort view. These methods can be used to map the sort view to the buffer, to map the buffer to the sort view, to retrieve the first user-sorted row, and to retrieve the last user-sorted row.

Note:

When a grid includes a hyperlink field that is user-sortable, the hyperlink label must be set in PeopleCode prior to allowing the user to perform the sort. Alternatively, the buffer can be sorted on the hyperlink field in PeopleCode upon entry into the page.

Parameters

Parameter Description

GridName

Specify the grid name as a string in PAGE.RECORD format in which PAGE is the page name and RECORD is the name of the grid as defined in Application Designer. (In Application Designer, select Page Field Properties, General tab to view the value for the Page Field Name field. The Page Field Name field’s value defaults to the primary record name for the level at which the grid occurs; however, the value can be changed by the application developer.)

Returns

A Boolean value: true if a user sort has been performed on the grid, false otherwise.