ExampleSaveData sample

Questions and answers for designing and implementing forms in Servoy

ExampleSaveData sample

Postby doug » Thu Feb 09, 2017 9:54 pm

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?
doug
 
Posts: 16
Joined: Mon Dec 12, 2016 11:45 pm

Re: ExampleSaveData sample

Postby sean » Fri Feb 10, 2017 11:07 pm

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.
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 8 guests