collapse expand a table with a break

Startbeitrag von Allard am 08.11.2010 22:39

Hi I use a table with 2 breaks in it.

I want the table to be collapsed when it is loaded.

I can get the first break to collapse at the start by using the following line

tablecollapsall ( tablename )

However when i click on one of the "+ "signs in the first break the the break expands but the other break (2e) expands as well?

I want the table to be collapsed at start and when one clicks on a "+ "Then onley the first table break should expand. Thus showing the 2e break in collapsed mode.

Does anyone know how to do this??

Thanks

Antworten:

Re: Collapse expand a table with a break

TableCollapseAll is used to collapse at the first row, thereby collapsing the whole thing. It has no effect on the collapse state of the individual branches.
A more reliable way would be to call TableCollapse for each of your branches (just loop through and call it with each branch name or row number)
That way when you expand one, the other will still retain it's collapsed status.

syntaxis:
TableCollapse( [, ])
TableCollapse( [, ])
where branch name is a string with format:
"" + TAB + ["" + TAB + ["" + TAB + [...]]]""




Message forwarded from pcsoft.us.windev

von Matt O..pcs.crosspost - am 16.11.2010 15:37

Re: Collapse expand a table with a break

Hello Allard,

I have exactly the same problem, how have you solved this?

Thanks.

von Sammy Broeders - am 22.02.2017 08:42

Re: Collapse expand a table with a break

Hi Sammy,

maybe you can hide the expand/collapse button (there seems to be an option for that) and add one of your own. And then use the TableExand() function i nthe code of the button to expand just that particular break. Not tried yet, just an idea.

von Arie - am 22.02.2017 10:35

Re: Collapse expand a table with a break

Thanks Arie, i will try.
I think it`s a bug in WD20 beacause in WD21 it works ok.

von Sammy Broeders - am 22.02.2017 12:19

Re: Collapse expand a table with a break

I can't find the right way to solve the problem. How can i put some code into the expand/collapse function?
Mayby there is someone with a useful example.

von Sammy Broeders - am 22.02.2017 21:13
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.