你可以设置数据集的IndexName属性,数据集即可按照此字段排序。
Delphi帮助 如下:
Use IndexName to specify an alternative index for a table. If IndexName is empty,
a table sort order is based on its default index, or, for dBASE tables, on its physical
record order.
If IndexName contains a valid index name, then
that index determines the sort order of
records. For dBASE tables, an index name supplied to the IndexName property must either
reside in the table's master index file, or in another index file already specified in the
IndexFiles property.
Note: IndexFieldNames and IndexName are mutually exclusive. Setting one clears the other.