cancel
Showing results for 
Search instead for 
Did you mean: 

Hide table column at runtime

former_member189058
Active Contributor
0 Kudos

Hi experts,

I have an adobe interactive form that shows a table. The table header is repeated for each page.

I have a subform that has a checkbox. When the checkbox is checked, the first table column is to be hidden.

I have written the following script on the click event of the checkbox: The script is in formCalc.


var cnt = xfa.form.form1.subform_main.Table1.Row1.instanceManager.count 
cnt = cnt - 1 //zero-based index 

var hdr_cnt = xfa.form.form1.subform_main.Table1.HeaderRow.instanceManager.count 

if ($.rawValue == 1) then 
  for i=0 upto cnt do 
    xfa.form.form1.subform_main.Table1.Row1<i>.field1.presence = "hidden" 
  endfor 
  for j=0 upto cnt_hdr do 
    xfa.form.form1.subform_main.Table1.HeaderRow[j].cell1.presence = "hidden" 
  endfor 
else 
    for i=0 upto cnt do 
    xfa.form.form1.subform_main.Table1.Row1<i>.field1.presence = "visible" 
  endfor 
  for j=0 upto cnt_hdr do 
    xfa.form.form1.subform_main.Table1.HeaderRow[j].cell1.presence = "visible" 
  endfor 
endif 

At runtime, When I click on the checkbox, all the rows of column1 are hidden but cell1 of header row is hidden only on the first page. for all other pages, the entire header is displayed.

Can anyone help me find a solution to this.

Regards,

Reema.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Can you please elaborate how you resolved the problem?

former_member189058
Active Contributor
0 Kudos

done!!

former_member189058
Active Contributor
0 Kudos

any suggestions???