Page 1 of 1

ExampleSaveData sample

PostPosted: Thu Feb 09, 2017 9:54 pm
by doug
I downloaded the ExampleSaveData

On the product form the list can be sorted by clicking on the Productname header and the icon changes. The header also has a dropdown list. In the form editor the "ProductGrid" form has a productname label with no code on any events and no icon and nothing defining the dropdown. How is this working? How is the sort order getting changed? How is an icon getting displayed and where are the dropdown values set?

Re: ExampleSaveData sample

PostPosted: Fri Feb 10, 2017 11:07 pm
by sean
Hi Doug,

Thanks for your interest in the ExampleSaveData demo.

The sortable columnheader, dropdown menu and sort icons are all included as part of the "tableView" form.
If you look at the "view" property of the form, it is set to "tableView"

The controls (such as fields and labels) on the form repeat in rows for every record in the foundset.

The element "productName_label" is designated as a column header because it has a "labelFor" property which links it to the "productName" element.
The default functionality is to toggle the sort (but it can also be overridden with your own code)

I hope this helps.