Table inside table must grow together

Avatar

Avatar

pmcastro

Avatar

pmcastro

pmcastro

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

radzmar

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

385

Correct Answer

485

Avatar

radzmar

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

385

Correct Answer

485
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)