Sortable Columns

Sortable Columns

Description

This property enables column sorting. If set to true, the user will be able to click on the column headings to resort the data.

For load-all grids, the records are sorted in ascending order of the clicked column if the data was in descending order before the click. The records will be sorted in descending order if the data was in ascending order before the click.

When values in the clicked column are the same, then the order that records were written to the subfile determines which record will be first:

  • If sort direction is ascending, then records written earlier to the subfile will appear before records written later. (FIFO)

  • If sort direction is descending, then records written later to the subfile will appear before records written earlier. (LIFO)

Note: Sorting is not available for grid that utilize the Grid Tree.

Additional Details

  • Promptable? DROPDOWN

  • Possible Values: True, false

  • Bindable? YES

  • Products: Profound UI

Multi-Column Sort

Multi-column sorting is available starting with Version 6, Fix Pack 3.0.

Users have the option to sort on multiple columns for grid widgets. This is used by selecting the “Sort...” option on the grid header's right-click context menu: 

Selecting this option will bring up a dialog that looks like this: 

This gives you the options to choose whether or not you want to sort a particular column (using the checkbox under the “Sort” column), as well as the order that you want your columns to be sorted in the column name and the sort direction (e.g., ascending or descending). 

Examples

Example 1 - Multi-Column Sort

With this grid, we want to sort on the “Product Name” column (ascending) and the “StockQuantity” column (descending). So, in the “Sort Multiple Columns” dialog, we would use the following settings: 

You can move the order of columns in this list by simply dragging and dropping them in the dialog.

Once we save these settings (by using the check-mark button in the upper right-hand corner), we can see that the grid has sorted in the correct sort direction for each column: