Repeating section value assignment works in button click event and fails in dropdown selection change event - InfoPath Dev
in

InfoPath Dev

Repeating section value assignment works in button click event and fails in dropdown selection change event

Last post 04-08-2014 01:41 PM by lcha123. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-08-2014 08:59 AM

    Repeating section value assignment works in button click event and fails in dropdown selection change event

     I can assign value in the button click event.  It works fine

    public void NewVendor_Clicked(object sender, ClickedEventArgs e)

    { e.Source.SelectSingleNode("my:ControlSwitch", NamespaceManager).SetValue("ShowComponent");}

     

     

    But I got error when I tried to do the same thing in dropdown box selection change event

     

     public void VendorList_Changed(object sender, XmlEventArgs {

    e.Site.SelectSingleNode("my:ControlSwitch", NamespaceManager).SetValue("ShowComponent");

    }

    The function is triggered from here

    EventManager.XmlEvents["/my:myFields/my:Purchase/my:PurchaseDetails/my:Quote/my:VendorList"].Changed += new XmlChangedEventHandler(VendorList_Changed);

     

     

     

  • 04-08-2014 01:41 PM In reply to

    Re: Repeating section value assignment works in button click event and fails in dropdown selection change event

     If I use ' /my:myFields/my:Purchase/my:PurchaseDetails/my:Quote/my:ControlSwitch', it doesn't throw exception, but it always goes to the first item, instead of current item.  If  it use my:ControlSwitch or /my:Quote/my:ControlSwitch, It throws Null Reference exception, although it is fine when I use my:ControlSwitch in Button click event

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