SortSort*
*Contents  *Index  *Topic Contents
*Previous Topic: RowDelim
*Next Topic: TextQualifier

Sort

Identifies the columns to be sorted, and ascending or descending sort order.

Syntax

dataobj.Sort = sValue

sValueString expression that is the name of one or more comma-separated names of columns in the text file. Each name can be optionally prefixed with a minus sign (-) to indicate a descending sort. By default this property is set to the empty string. If there is no header line that names the columns, they are given default names of Column1, Column2, Column3, and so on. If Sort is set to an empty string (""), no data will be sorted.

Data types are sorted as follows:
Data typeAscendingDescending
Text"a", "b", "c" ... "z""z", "y", "x" ... "a"
Numeric... -1, 0, 1, ......1, 0, -1...
Date1/1/1950, 1/1/1990, 1/1/20001/1/2000, 1/1/1990, 1/1/1950
LogicalFalse, False, ... , True, TrueTrue, True, ..., False, False

Sort sorts the data displayed to the users. It can be set in the initial <OBJECT> tag description to cause initial sorting, or the browser script language can set it and sorting will take effect when the Reset method is called.

Text data is sorted case-insensitively.

The following example shows how you could sort a food list into ascending order by name and decreasing price.

dataobj.Sort = "FoodItem; -Price"

All invalid data always sorts higher than valid data. For example, a string in an ascending numeric column will display at the end. Multiple invalid data rows are grouped together but not sorted into a defined order within the group.

See Also

Filter, Reset


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.