PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Taking the sort order into account
  • Characters taken into account for punctuation and spaces
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SortOption is used to find out and modify the sort options used in:
  • the text columns found in Table controls,
  • the text columns found in TreeView Table controls,
  • the List Box and ListView controls,
  • the Combo Box controls,
This property can only be used on the "memory" controls. It is not available for the "browsing" controls. These sort options can be defined in the window editor or in the page editor, in the "Details" tab of control description.
Example
// Sorts a list while respecting the numeric order
LIST_Turnover.SortOption = ccRespectNumeric
Syntax

Finding out the sort options used Hide the details

<Sort options> = <Control used>.SortOption
<Sort options>: Integer constant
Sort option currently applied:
ccLexicographicOrderSorts the strings in lexicographical order (for example, 'é' is between 'e' and 'f')
ccNormal
(Default value)
Standard comparison, similar to the = operator
ccRespectNumericSort while taking into account the numeric values inside the strings (in this case, "10" comes after "9").
ccIgnoreAccentSort while ignoring the accented characters
ccIgnoreCaseSort while ignoring the case (uppercase/lowercase characters)
ccIgnoreSpaceSort while ignoring the space characters found before and after the character strings
ccIgnorePunctuationAndSpaceSort while ignoring the punctuation and the space characters (see the Notes for more details)
sortDefaultPerforms a case-insensitive and accent-insensitive sort. Ignores spaces
sortWithoutFunctionGxxxSorts ignoring elements such as gImage, gLink, ... By default, these elements are taken into account by the sort.
<Control used>: Control name
Name of control to use.

Modifying the sort options Hide the details

<Control used>.SortOption = <Sort options>
<Control used>: Control name
Name of control to use.
<Sort options>: Combination of Integer constants
Sort option that will be applied to the control:
ccLexicographicOrderSorts the strings in lexicographical order (for example, 'é' is between 'e' and 'f')
ccNormal
(Default value)
Standard comparison, similar to the = operator
ccRespectNumericSort while taking into account the numeric values inside the strings (in this case, "10" comes after "9").
ccIgnoreAccentSort while ignoring the accented characters
ccIgnoreCaseSort while ignoring the case (uppercase/lowercase characters)
ccIgnoreSpaceSort while ignoring the space characters found before and after the character strings
ccIgnorePunctuationAndSpaceSort while ignoring the punctuation and the space characters (see the Notes for more details)
sortDefault (cannot be combined)Performs a case-insensitive and accent-insensitive sort. Ignores spaces
sortWithoutFunctionGxxxSorts ignoring elements such as gImage, gLink, ... By default, these elements are taken into account by the sort.
Remarks

Taking the sort order into account

  • For the List and Combo Box fields, the sort order specified with the SortOption property is taken into account immediately.
  • For the columns found in the tables or in the treeview tables, TableSort must be called in order for the specified sort order to be taken into account. For example:
    COL_Name.SortOption = ccLexicographicOrder
    TableSort(TABLE_Name, "+COL_Name")

Characters taken into account for punctuation and spaces

The characters taken into account for punctuation and spaces are provided by the system. To get the list of these characters, write the following WLanguage code:
s is string
FOR i = 0 TO 255
IF Charact(i) <> StringFormat(Charact(i), ccIgnorePunctuationAndSpace) THEN
 s += Charact(i)
END
END
Info(s)
ToClipboard(s)
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment