Table inside table must grow together

Avatar

Avatar
Validate 1
Level 1
pmcastro
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
pmcastro
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
pmcastro
Level 1

25-05-2020

Hello

I have a table inside a table. I need that the second table (in Red) expands together with the first cell of the blue table.

pmcastro_2-1590417437591.png

In blue the first table with 2 columns

In red the other table inside cell 2 of the first table

How can I do this?

 

Tkanks for your help.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

27-05-2020

Hi, 

 

you can use a script to "synchronize" the heights of the inner and outer table. 

Aussumed you have the following hierarchy.

radzmar_0-1590566994757.png

 

Put this script into the layout:ready event of the row "NestedRow" of the nested table.

var cUnit = "mm",
	nRefH = xfa.layout.h(Table.Row, cUnit),
	nThisH = xfa.layout.h(this, cUnit);
	
NestedCell1.minH = nRefH > nThisH === true ? nRefH.toString().concat(cUnit) : "5mm"; // replace 5mm with a minimum height of your choice.
xfa.layout.relayout();

 

The script will compare the height of the row that contains nested table with the row of the nested table itself and will change the minimum height of the first cell of the nested table. All other cells of it will then automatically use the same height.

 

 

Answers (0)