SSortOrder
The SSortOrder
structure defines the sort order of data in a table.
Quick Info
Header
file: |
MAPIDEFS.H |
typedef struct _SSortOrder
{
ULONG
ulPropTag;
ULONG
ulOrder;
} SSortOrder, FAR *LPSSortOrder;
Members
ulPropTag
Property tag
identifying the sort key column.
ulOrder
The order in
which the data is to be sorted. Possible values are:
TABLE_SORT_ASCEND
The table
should be sorted in ascending order.
TABLE_SORT_COMBINE
This category,
as identified by the ulPropTag member, should be combined with the ulPropTag
member of the previous sort order to form a sort key. This flag is only valid
with categorized tables that specify multiple sort orders in a SSortOrderSet
structure.
TABLE_SORT_DESCEND
The table
should be sorted in descending order.
Remarks
Client applications
and service providers use an SSortOrder structure for specifying a sort
key for a table.
The ulPropTag
member can always be set to a property tag for a column in the current view.
Support for sort keys defined with available columns that are not in the
current view, although valuable, depends on the implementer of the table. Some
tables support these extra sort key columns; others do not. An available column
is a column that is returned from IMAPITable::QueryColumns
The ulOrder
member indicates both directional order and categorization information. Rows
can be sorted in either an ascending or descending sequence with all NULL
entries placed last. The ulOrder member can be set to TABLE_ASCEND,
TABLE_DESCEND, or TABLE_SORT_COMBINE, for categorized tables.
The
TABLE_SORT_COMBINE value indicates that the column specified in ulPropTag
should be combined with the previous category column to form a composite
category. That is, instead of categorizing on unique values of individual
columns, TABLE_SORT_COMBINE allows categorization on unique values of a
combination of columns. A single category could be defined, for example, to
group messages received from a particular sender on a particular subject. Using
TABLE_SORT_COMBINE reduces the number of category rows which are displayed.
Sorting on
multivalued columns is not universally supported by all table implementations.
If supported, apply the MV_FLAG using the MVI_PROP macro to the property tag in
the ulPropTag member to identify the sort key as a multivalued column.
Sorting on a multivalued column is based on using the individual values.
For more
information about standard and categorized sorting, see Sorting and
Categorization
See Also