Add an optionnal section with c# - InfoPath Dev
in

InfoPath Dev

Add an optionnal section with c#

Last post 09-13-2005 06:37 AM by Coita Thierry. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-12-2005 01:02 AM

    Add an optionnal section with c#

    Hi,

    I have the following problem:
    If I try to insert an optionnal section with this:

    thisXDocument.View.ExecuteAction("xOptional::insert", "Bestellung_209");


    but in the manifest you can read:
    <xsf:xmlToEdit name="Bestellung_209" item="/ns1:Case/ns1:Bestellung" 
    container="/ns1:Case">
    <xsf:editWith caption="Bestellung" xd:autogeneration
    ="template" component="xOptional">

    and
    <xsf:button action="xOptional::insert" xmlToEdit="Bestellung_209" 
    caption="Bestellung">


    In infopath user mode you can insert this section why I can't with a c# code? What I'm doing wrong?

    Thanks for your help!

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 09-13-2005 01:36 AM In reply to

    Re: Add an optionnal section with c#

    Hi Thierry,
    Try the other way. Use xdExpression from the view to control the hide/show characteristics of the optional section. xdExpression calls a function in your code that returns true or false. This is the prescribed way to do what you want and you should find various threads and articles with examples if you search on the forum or website. Good luck!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 09-13-2005 06:37 AM In reply to

    Re: Add an optionnal section with c#

    Hi Patrick,

    Thanks for your answer I have found the article! I will try!

    ++

    Thierry



    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.