Create a class container which is in effect all the controls/logic you will find on the page.
When you create a page in the pageframe you can add the container to it and if you write the container correctly then it should point to the relevant data.
The nice thing about doing this is that you can easily write/test the container out on a normal form.
As opposed to using a container that you place on the page of the pageframe you could always substitute an actual page for the container and generate a new page class which you could also add programmatically.
The container approach is definitely the easiest to do and debug. Be careful to anchor controls so that any resizing of the container will automatically reposition the controls in the container.
We do this on lots of forms where e have jobs that can run on multiple machines, each page in the pageframe being dedicated to the machine.
My only worry would be the number of pages you wish to display and the amount of data to refresh but Pages only refresh when activated so you can easily put all your refresh info in the container as a method and then call the method on the page "activate" event.
As for all the records being part of the same table, personally I would scatter the data from the appropriate table/record into a names object and then bind this to the container as a property which can be distributed to the relevant controls within the container.
If you need to update the view then gather the modified object when finished editing or have a load/update method on the container that does this automatically.
Also using classes this way means that you can pass in data from any table assuming you design the container and its methods correctly.
Take a bit of time getting the design, properties and methods defined and it should be simple.
No need to use the DE if you don't want to as the source of the data would be irrelevant to the container.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Chris Davis Sent: 07 March 2016 14:34 To: profox@leafe.com Subject: Forms and Date Environments
Hi All
Just a pointer if possible.
I want to create a form with one page frame and an unknown number of pages.
Each page will be identical and editing one record out of a view.
How am I best managing the data in this instance?
Typically we would develop visually, add a view into the data environment and set control sources.
Could I make use of the data environment class?
Other ideas?
Thanks
Chris.
Chris Davis Acton Gate Systems Limited
Hilton Hall Business Centre Hilton Lane Essington West Midlands WV11 2BQ M: 07966 020473 *: chrisd@actongate.co.uk Webmailto:chrisd@actongate.co.uk%0bWeb: www.actongate.co.ukhttp://www.actongate.co.uk/
______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]