piSortColumn - cWebList
Determines which column the list is currently sorted by
Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None
Syntax
{ WebProperty=Client }
Property Integer piSortColumn
| Access Type | Syntax |
|---|---|
| Read Access: | WebGet piSortColumn to IntegerVariable |
| Write Access: | WebSet piSortColumn to IntegerVariable/Value |
Description
Determines which list column the list is currently sorted by. The first column is 0.
It is recommended that you always Set an initial piSortColumn in your code. Use a Set command for this.
Object oList is a cWebList
:
Set piSortColumn to 1
This is a web property and its value can be changed dynamically either on the client by client by clicking on a column header or via code using WebGet/WebSet.
Object oSearchOrderSalesP_ID is a cWebMenuItem
Set psCaption to "List by Sales Person Id"
Set peActionDisplay to adMenu
Set pbBeginGroup to True
Procedure OnClick
WebSet piSortColumn of oList to 3
Send GridRefresh of oList
End_Procedure
End_Object
If this property is not set, it's value will be -1, meaning that it does not control the sort order.
Controlling Index Order
When working with data-aware lists, follow these guidelines for controlling index order:
-
Use piSortColumn to control index order
-
Always set an initial piSortColumn value
-
If you need to further control index order, augment the IndexOrder function
-
Do not set these properties: cWebList piOrdering cWebColumn piDefaultIndexDataDictionary Ordering If you set peDbGridType to gtAllData, it will load all data to the client and will allow sorting on all columns (which is then done on the client).
See Indexes and Ordering with Data Aware cWebLists for a more complete description of this process.
About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.
About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.