Sample Applications / Order Form / Orders

  Setting a Sort Expression

Table of Contents
Sample Applications / Order Form / OrdersPrint||
Setting a Sort Expression

Now that the Order Form page has been set up, we will want to customize several settings. First, we shall optimize the Orders controller. The list of order is currently displayed in alphabetical order of Customer Company Name. It would make more sense to sort the orders according to the date the order was made.

Switch back to the Designer. In the Project Explorer, double-click on Order Form / c101 / view1 (Orders) / grid1 data view node.

View 'grid1' of Orders data controller, accessed view data view 'view1' on the Order Form page.

Change the Sort Expression to the following:

Property New Value
Sort Expression OrderDate desc

Press OK to save the view. On the toolbar, press Browse to regenerate the application. If you navigate to Order Form page, you will see that the orders are sorted in descending order of Order Date.

The list of orders has been sorted in descending order of Order Date.