Highlighted

Hide table column at runtime

Avatar

11-09-2008

Hi experts,



I have an adobe interactibe 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.