Freigeben über


Sort Object Foundation Class

Category Data Query
Default Catalog Visual FoxPro Catalog\Foundation Classes\Data Query
Class _tablesort
Base Class Custom
Class Library _table.vcx
Parent Class _table
Sample ...\Samples\Solution\Ffc\datasort.scx

Remarks

This class, when placed on a form, enables you to sort a datasource.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class icon on the form. You can then specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
lDescending property Specifies whether the sort order is
ascending or descending.
Default: .F.
DoSort method Makes it possible for you to sort on the current field or
to specify the field on which to order a
table or alias.
Syntax: DoSort([tcField] [,tcAlias] [,tcTag] [,tlDescending])
Return: none
Arguments:
tcField specifies the field to sort on.
tcAlias specifies the alias of the table to
sort.
tcTag specifies the index tag of the field,
tcField.
tlDescending specifies whether the sort is
a descending sort.
GetSortTag method Looks for an appropriate tag name by
looking at key expressions in the table
relevant to the field name.
Syntax: Getsorttag(tcField, tcAlias)
Return: lcTag
Arguments:
tcField specifies the field to sort on.
tcAlias specifies the alias of the table to
sort.
RemoveSort method Removes the current index tag.
Syntax: RemoveSort(tcAlias)
Return: none
Arguments:
tcAlias specifies the alias of the table from
which to remove the tag.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Classes