Step 5. Make List View Columns Sortable

In this step you will change the SortOnClick property for the surname, given name and postal code columns in the employees list view to allow sorting using these columns.

1.  In the Design view, select the list ListView1 and click on the Surname column heading. Select the Details tab, which will show the properties for this columns (LVCL2). Change the SortOnClick property to true.

2.  Click on the column heading for Given Name and Postal Code and change their SortOnClick property to true.

3.  Compile and retest your form. You should be able to sort the list of employees by surname, given name or postal code by clicking on the column heading. Note that by default the column heading shows sort direction. Clicking on a column heading a second time reverses the sort direction.