Sort Options Properties

Description

Customize the sort options, including adding 'Sorting' and 'Order' listboxes to the search part that can be used to add your own custom sorting criteria.

Discussion

A sorting listbox can be added to the Search Part in the Grid component. The sorting listbox can be used to add custom sort expressions to the Grid Component.

Include 'Sorting' listbox

Specify whether the Search part includes a listbox to allow users to select the sort order for the data. If checked, a 'Sorting' listbox will be added to the Search part.

Label for 'Sorting' listbox

Specify the label for the 'Sorting' listbox. Default label is "Sort by".

Label position

Specify the position for the label for the 'Sorting' listbox. Default value is 'Left'.

Left

Label is shown to the left of the 'Sorting' listbox.

Above

Label is shown above the 'Sorting' listbox.

Inline style for 'Sorting' label

Specify the inline styles for the 'Sorting' row label.

'Sort' listbox default

Specify the text to show in the 'Sort' listbox when the user has not selected a value. Default value is 'Select Field'.

Use column headings in sort listbox

If checked, column headings will be used in the 'Sort' listbox instead of field names. It is recommended to use the column headings if the field names are cryptic or would not be understood by the user.

Custom sort expressions

In addition to sorting on the columns in the Grid, you can specify custom sort expressions that can be displayed in the 'Sort' listbox. You can create as many custom sorting expressions as you want.

Use the Smart Field button for the Custom sort expressions property to open the 'Custom Sort Expressions' builder.

images/customSortExpressions.png

Each custom sort expression must be defined on its own line using the following format:

Label|Expression

The sort expression syntax depends on the type of data source. For Grids based on a SQL data source, the Expression must use SQL syntax. For example:

Fullname|Lastname, Firstname
State|State, City
Salary|Department, Salary DESC

For Grids based on a DBF data source, DBF syntax must be used:

Fullname|alltrim(lastname) + Firstname
State|alltrim(State) + City

'Order' listbox options

Specify the choices that appear in the 'Order' listbox. The first option is for Ascending order, and the second option is for Descending order. For example:

Ascending,Descending

'Order' listbox default

Specify the text to show in the 'Order' listbox when the user has not selected a value. The default value is "Select Order".