How to open optional section - InfoPath Dev
in

InfoPath Dev

How to open optional section

Last post 04-14-2005 12:29 PM by Agni Jonnalagadda. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-12-2005 02:10 AM

    How to open optional section

    I have an optional section in my form which is hide by default!

    How can I Show it by C# code???
  • 04-12-2005 07:28 AM In reply to

    Re: How to open optional section

    Go to the Optional section properties and select "Include this section in the form by default" checkbox. This will show the Optional section by default in the view.

    Shanthi
    InfoPathDev India
    Shanthi Reddy
  • 04-13-2005 12:01 AM In reply to

    Re: How to open optional section

    You didnt understand my question.
    I dont want the section to be shown! I want it to be shown only aftrer any change in me form. I want to display the section from the code on event in my form.
  • 04-13-2005 09:41 AM In reply to

    Re: How to open optional section

    If a node is an optional in the xml and in the Infopath UI then then that node will not be present in the XML by default. You can add this node in the code, when you add this node in the code that optional field will be seen in the UI.

    Here is the sample to add a Node
    string sXml = "<my:group1 xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-04-13T11:32:39'><my:field1/></my:group1>";
    IXMLDOMDocument oXml = thisXDocument.CreateDOM();
    oXml.async = false;
    oXml.loadXML(sXml);
    getNode("//my:myFields").appendChild(oXml.documentElement);

    Agni
    InfopathDev India
  • 04-13-2005 11:59 PM In reply to

    Re: How to open optional section

    I want to present all section and not only specific node in the section. My section contan table with fileds and text.
  • 04-14-2005 12:29 PM In reply to

    Re: How to open optional section

    In the above example that i have give note that "<my:group1>" is a section which contains a node within it. Similarly you can have your fields inside that xml.

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