Inserting/Deleting Repeating Sections With C# - InfoPath Dev
in

InfoPath Dev

Inserting/Deleting Repeating Sections With C#

Last post 09-16-2009 11:53 PM by xfields. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-19-2006 07:18 AM

    Inserting/Deleting Repeating Sections With C#

    I was trying to implement my own buttons to insert or delete a new section in a repeating section.

    The idea is that the repeating section starts off with no sections, and the user has to press a button to add a section. Therefore, the insert section function is not in repeating section. Once they create a section, there will be another button that will allow them to delete that section.

    I've been searching for a way to programmatically insert/delete sections in a repeating section, but haven't found anything yet. If you could please help, I'd be greatly appreciative. Thanks!
  • 05-19-2006 11:22 AM In reply to

    Re: Inserting/Deleting Repeating Sections With C#

    Ok, so I figured out how to add and delete a section by adding in the proper xml to the DOM. One question remains, if there is a button in each item/section/row of the repeating section, how do I get that button to delete its respective section and no others?
  • 05-19-2006 12:25 PM In reply to

    Re: Inserting/Deleting Repeating Sections With C#

    Figured that out as well... no more help needed. Feel free to contact me via e-mail if you are having the same problems.
  • 05-22-2006 05:02 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-28-2006
    • Australia
    • Posts 44

    Re: Inserting/Deleting Repeating Sections With C#

    Glad you got yours working.

    Incase anyone else wants to do similarly. Removing or adding sections can be done in javascript (not sure about C# but presumably in other languages aswell) with code like the following:

    eventObj.XDocument.View.ExecuteAction("xOptional::insert","group32_54");

    eventObj.XDocument.View.ExecuteAction("xOptional::remove","group32_54");

    I just thought someone might find this useful...
  • 09-16-2009 11:53 PM In reply to

    • xfields
    • Not Ranked
      Male
    • Joined on 09-08-2009
    • Germany
    • Posts 20

    Re: Inserting/Deleting Repeating Sections With C#

    Mhh year - woul dbe very interresting to know how was the solution in C#

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