Skip to main content

TdxCustomMemData.SortedFields Property

Specifies one or more fields against which the TdxMemData component sorts its content.

Declaration

property SortedFields: string read; write;

Property Value

Type
string

Remarks

Assign a field name to this property to sort data against this field in ascending or descending order, depending flags set in the SortOptions property. You can specify multiple field names delimited by semicolons to sort data against multiple fields. The field name order in the SortedFields property value defines the order of multiple sort operations.

Flags in the SortOptions property value define the sort order and case sensitivity for all listed fields but you can add sort syntax flags after each field to define individual sort settings. Append a colon followed by the ‘D’ or ‘A’ flag character to any field name to explicitly set descending or ascending sort order for the corresponding field. For example, the ‘D’ flag character sets descending sort order for the Quantity field. Note that the flag characters are always case-insensitive.

The ‘N’ character flag defines case-insensitive sorting against a marked field. If you need to specify more than one character flag for a field, list them in a row after a colon, without delimiters.

dxMemData1.SortedFields := 'CustomerName:DN;Quantity:D;UnitPrice:A';

Alternatively, you can use the SortedFields property editor dialog available at design time to preview and manage the list of sorted fields and their sort syntax flags. Click an ellipsis button to the right of the SortedFields property in the Object Inspector to invoke the dialog.

A click on the Add button invokes the pop-up menu with available field names that you can click to add or remove them to/from the SortedFields property value. The Ascending, Descending, and Case Insensitive buttons manage sort syntax flags for a selected field. The Move Down and Move Up buttons rearrange listed fields to change the order of sort operations.

Note

The TdxMemData component does not support sort operations against calculated fields.

The SortedFields property’s default value is an empty string.

See Also