ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • "Sortable" column
  • Sort in a Table control based on a data file
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Sortable property is used to:
  • Determine if a Table control column is sortable.
  • Make a column of a Table control sortable or not.
A "sortable" column is a column that allows the user to sort the information displayed in the Table control.
WEBDEV - Server code This property is only available for Table controls in "Server + AJAX" mode.
Example
// Allow the user to select the "COL_CustomerName" column
// as sort criterion of the table
COL_CustomerName.Sortable = True
Syntax

Determining if a column is sortable Hide the details

<Result> = <Column used>.Sortable
<Result>: Boolean
  • True if the specified column is sortable,
  • False otherwise.
<Column used>: Control name
Name of the column to be used.

Making a column sortable or not Hide the details

<Column used>.Sortable = <Sortable?>
<Column used>: Control name
Name of the column to be used.
<Sortable?>: Boolean
  • True if the specified column must be sortable,
  • False otherwise.
Remarks

"Sortable" column

  • By default, a column is sortable when it is created. This option can be modified in the window editor ("General" tab of the column description).
  • When "Sortable" is checked, the user will have the ability to sort the Table control by clicking the column header.
  • If a column is sortable, an icon representing a double arrow is displayed in the column header.

Sort in a Table control based on a data file

A column can be sorted by the user only if:
  • The item associated with the column is a key.
  • No filter exists on this data file.
The Sortable property can still return and/or be initialized to True. However, no icon is displayed in the column header and the user will not be able to sort this column.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help