Spread 8.0 Documentation
DLL
Support Options

Glossary Item Box

DLL


To sort the sheet based on a specific column using code

  1. Call the SSSetColUserSortIndicator function and set the parameters as follows:
    1. Set the Col parameter to specify the column.
    2. Set the nColUserSortIndicator parameter to specify the sort method:
      • If you want to sort in ascending order, set the property to 1 (SS_COLUSERSORTINDICATOR_ASCENDING).
      • If you want to sort in descending order, set the property to 2 (SS_COLUSERSORTINDICATOR_DESCENDING).
  2. Call the SSSetUserColAction function and set the nUserColAction parameter as follows:
    • If you want the column to be sorted and display the sort indicator, set the nUserColAction parameter to 1 (SS_USERCOLACTION_SORT).
    • If you want the column to be sorted and not display the sort indicator, set the nUserColAction parameter to 2 (SS_USERCOLACTION_SORTNOINDICATOR).
  3. If your sheet displays multiple headers and you want the sort indicator to display in a row other than the bottom-most header row, specify which column header row will display the indicator by calling the SSSetColHeadersUserSortIndex function.
Copyright © GrapeCity, inc. All rights reserved.