How to delete a control from infopath document programmatically? - InfoPath Dev
in

InfoPath Dev

How to delete a control from infopath document programmatically?

Last post 03-19-2009 07:48 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-17-2009 02:59 AM

    • vivek
    • Not Ranked
    • Joined on 03-16-2009
    • Posts 2

    How to delete a control from infopath document programmatically?

    Hi, I have a infopath form which has some controls bound to (MSSQL) database. Against every control i have a checkbox which if, checked should delete the corresponding control from the document. Basically I'm preparing a report using infopath so i wanna give user the option to exclude undesired parameter from the report. I am doing this using .NET(c#). plz help.. thanks
    Filed under:
  • 03-17-2009 08:12 AM In reply to

    Re: How to delete a control from infopath document programmatically?

    Hi -- why delete? Why not just conditionally format to hide the control if the checkbox is checked?

    Hilary Stoupa

  • 03-17-2009 08:50 PM In reply to

    • vivek
    • Not Ranked
    • Joined on 03-16-2009
    • Posts 2

    Re: How to delete a control from infopath document programmatically?

    Hilary Stoupa:

    Hi -- why delete? Why not just conditionally format to hide the control if the checkbox is checked?

    The problem is, I have to finally convert the infopath document into a word document and for that purpose I'm using a style sheet, which extracts the values of controls present in infopath doc(using xslt) and places them in word document. So hiding the control doesn't solve my problem because it's still copied to word document. I need a way to delete the control's value when I check the checkbox.
  • 03-19-2009 07:48 AM In reply to

    Re: How to delete a control from infopath document programmatically?

    Okay, so you don't really need to delete the control, just set the data field's value to blank, correct? Are you using IP 2003 or IP 2007? The object model is different.....

    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.