Caplin Trader 4.8.0

Class: module:caplin/grid/sort/FieldSortRule

module:caplin/grid/sort/FieldSortRule

The FieldSortRule class allows simple, non custom, sorting by a given field-name, using standard comparator operators.

Clients that have more specialized sorting requirements, can implement a custom client-side module:caplin/grid/sort/SortRule, and corresponding back-end Java code.

Constructor

new module:caplin/grid/sort/FieldSortRule(sFieldName, sSortType, sSortOrder)

Constructs a FieldSortRule.
Parameters:
Name Type Description
sFieldName String The name of the field that any data will sorted on.
sSortType String The name of the sort operand that will be used to perform the sorting.
sSortOrder boolean Whether the sort will be ascending or descending.
Implements:

Methods

getColumnId()

Return the id of the column that this sort rule is applied to.

getFieldName()

Return the field name this sort rule is applied to.

getSortOrder()

Return the order of the sort being applied.

getSortType()

Return the type of sort that is being applied.

needsSortType()

Indicates whether this sort rule requires a sort type.

setSortType(sSortType)

Sets the sort type.
Parameters:
Name Type Description
sSortType String The new sort type