Spread 8.0 Documentation
SSGetColHeadersUserSortIndex, SSSetColHeadersUserSortIndex Functions
Support Options
DLL Reference > DLL Functions > SSGetColHeadersUserSortIndex, SSSetColHeadersUserSortIndex Functions

Glossary Item Box

SSGetColHeadersUserSortIndex, SSSetColHeadersUserSortIndex Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return which column header row displays the sort indicator when there are multiple column header rows.

Syntax

C

SS_COORD SSGetColHeadersUserSortIndex(HWND hWnd);

void SSSetColHeadersUserSortIndex(HWND hWnd, SS_COORD lColHeadersUserSortIndex);

C++

SS_COORD TSpread::GetColHeadersUserSortIndex( );

void TSpread::SetColHeadersUserSortIndex(SS_COORD lColHeadersUserSortIndex);

Parameters

The SSGetColHeadersUserSortIndex and SSSetColHeadersUserSortIndex functions have the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
lColHeadersUserSortIndex Index of header to display the user sort indicator

Remarks

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function.

The default index value is –1, which specifies to display the sort indicator in the bottom-most row of column header rows.

Call this function to specify which column header row displays the sort indicator when there are multiple column header rows. To specify the index, set the lColHeadersUserSortIndex parameter to a value between 0 and n–1, where 0 is the topmost row and n is the number of header rows. Call the SSSetColHeaderRows function to specify the number of column header rows in the sheet.

You can allow users to sort data by clicking a column header by calling the SSSetUserColAction function to specify the type of sorting and whether to display the sort indicator.

This function does not have an effect unless the SSB_SHOWCOLHEADERS boolean for the SSSetBool function is set to TRUE, the column header that displays the sort indicator is not hidden, and the nUserColAction parameter for the SSSetUserColAction function is set to SS_USERCOLACTION_SORT.

Return Value

SSGetColHeadersUserSortIndex: Index of header that displays the user sort indicator or –1
SSSetColHeadersUserSortIndex: None

See Also

Allowing Users To Sort By Columns

SSSetBool, SSSetColHeaderRows, SSSetColUserSortIndicator, SSSetSheet, SSSetUserColAction functions

ActiveX Correspondence

ColHeadersUserSortIndex property

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.