Highlighted

Restore Hidden Rows

Avatar

Guest

03-12-2008

I have a dynamic table populated via XML. Is there a way that I can "Hide" all rows where "Qty" == null and if the user wanted to, restore all those hidden rows with "visible"?



One button = hide all rows without an entry in "Qty"



Second button = make visible all rows that were hidden via the above button.



Any help on this subject would be greatly appreciated.



This is what I already have, and it works ONLY for the first row of the section.



if (TableSubForm.Table.Row2.ProductRow1.Cell2.rawValue == null) {

TableSubForm.Table.Row2.ProductRow1.presence = "hidden";

}

else {

TableSubForm.Table.Row2.ProductRow1.presence = "visible";

}

Replies

Highlighted

pguerett

03-12-2008

Yes ...you will have to look at each row individually then check your Qty to see its value. Note that the occurance number of each of the fields will be on the row subform. So your code shoudl look something like this:



for(i=0; i< TableSubForm.Table.Row2.ProductRow1.count;i+){

if (xfa.resolveNode("TableSubForm.Table.Row2.ProductRow1[" + i + "]").Cell2.rawValue == null) {

xfa.resolveNode("TableSubForm.Table.Row2.ProductRow1[" + i + "]").presence = "hidden";

}

else {

xfa.resolveNode("TableSubForm.Table.Row2.ProductRow1[" + i + "]").presence = "visible";

}
Highlighted

Avatar

Guest

03-12-2008

Thank you for the answer. I have provided you with a link to a quick screen grab so that you can visualise what seems to be the problem.



Again, thanks for getting back to me so soon.



Regards,



Glenn



http://www.draegercanada.com/screengrab.jpg