skip to main content

Controls Reference : GRID : Properties : Sort-Types

Sort-Types
This property specifies the sorting property of the Grid control columns. Multiple values can be specified enclosed between parentheses. Values are applied to cells, starting from the first. Sort types are represented by single characters.
Valid values are:
Any value other than the ones described above prevents sorting on the column.
The default sort ordering is ascending. You may specify the default order as descending by appending a caret (^) to the Sort-Types value. For example “X^” specifies a descending alphanumeric sort. Optional elements may be specified in any order. For example ”D^(MDY)” and “D(MDY)^” both specify a descending date field using the month-day-year ordering.
Ascending/descending order only determines the sort order when the user first clicks on the column. After that, the user can reverse the ordering by clicking again.
The user requests the sort by clicking on the column header. The Column-Headings style must be set in order to be sorted by the user.
This property overrides the Sortable-Columns style. If both are set, the runtime behaves like if only Sort-Types was set.
 
Example - Define a grid where column 1 and 3 are sortable
screen section.
  03 screen-1-gr-1 Grid
     line 5.7
     column 3.1
     size 34.6 cells 
     lines 15.5 cells 
     help-id 5040
     event procedure screen-1-gr-1-evt-proc
     column-headings
     hscroll
     heading-color 200
     heading-divider-color 12
     cursor-frame-width 3
     display-columns (1, 10, 20, 30)
     sort-types ("X", "-", "X", "-")
     num-rows 5

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left