CodeCharge Studio
DataSource.Order Run-Time Property (ASP)
Applies to
DataSource object
Type
string
Access
read/write
Syntax
object.DataSource.Order [=value]
Description
This property holds the list of fields that are used in the ORDER BY clause of the SELECT query. CCS initializes this property internally, for example if an order option has been specified in the properties of the form. Modification of this field (before the query is executed) will change the order of the results.
Example
The sample code below assigns default sorting field to the Order property if the property has not been initialized earlier.
Function Page_AfterInitialize()
If articles.DataSource.Order = Empty Then
articles.DataSource.Order = "date_add"
End if
End Function
See also
DataSource.SQL property
DataSource.Where property
Related Examples
Dynamically Modify the ORDER BY Clause
On-line, printable versions and updates