Delete InfoPath Control from Code

K

kalisin

Is there a way I can delete an infopath control from code? Please
help! I am able to change the values in carious controls but I can't
delete the control completely. I am trying to delete all instances of
a repeating table when a certain event takes place.

Thanks.
 
S

Scott Roberts [MSFT]

InfoPath's object model is completely data-centric so there is no way to
delete a control from code. However, you can delete the data. For a
repeating table, if you delete all the repeating items in the XML DOM, the
rows will disappear. You will likely be left with a header row though.
Another way to deal with this is to put the repeating table in a section and
use conditional formatting on the section to hide it if the count of the
number of items in the repeating table is 0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top