WD: Master/Detail in Table

Startbeitrag von Raymond Thomas am 08.04.2013 09:59

Hi,

I need some advice on how to best display the following in WinDev17. I want to display in a table a list of Customer and all their orders. The idea is that the orders must be hidden at first and the user must click on a +/- sign next to the Customer name to show/hide all the orders for that Customer.

Any ideas would be appreciated.

Antworten:

Hi,
You must use a Table Treeview control.

http://doc.pcsoft.fr/en-US/?1015001

This is the right solution for your problem.

von Giovanni Carella - am 08.04.2013 10:13
Hello Raymond

If you want to do it in a single table then Giovanni is right and a tree table would be the best approach, but you also said that any ideas would be appreciated so ...

I would use multiple tables to show a customer list and use the table row selection to populate a second table with a list of order header records and then a third table triggered from the order header row selection to populate a list of order lines for that order.

I would run a vertical customer table list on the left hand side with a full length vertical splitter and on the right hand side of the splitter, two tables one above the other, with the top table showing the order header and the bottom table showing the order lines. When a customer is selected, the orders are displayed and when an order is selected, its order lines are displayed. You could run a horizontal splitter between the order header and order line tables if required.

Regards
Al

von Al - am 08.04.2013 12:25
Thanks for suggestions - I will give both a try and post back my results.

von Raymond Thomas - am 08.04.2013 14:28
Raymond,

I've done exactly what you describe by adding an ordinary table control to a window, then in the properties, ensure it's populated by a query and I just added a break header with the "Breaks with collapsed/expanded" check box checked.

von DarrenF - am 08.04.2013 19:14
Thanks Darren, I tried your table break solution and it did exactly what I required. Quick & easy:xcool:

von Raymond Thomas - am 10.04.2013 06:05
Just finished tested Giovanni's & Al's suggestions above and both options also solve my requirements. I prefer to use either the Table Treeview or Table Break options since it allows me to use one table and save some screen space.:xcool:

Thanks again for the many solutions.:cheers:

von Raymond Thomas - am 11.04.2013 13:37
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.