Infopath avoid method on form load - InfoPath Dev
in

InfoPath Dev

Infopath avoid method on form load

Last post 01-20-2014 07:47 AM by renatois. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-20-2014 12:43 AM

    Infopath avoid method on form load

    Hi, when I simply open a form it loads the FormEvents_Loading but also loads the method of the DropDown change (public void drpChantier_Changed(object sender, XmlEventArgs e)). So it goes to FormEvents_Loading and also drpChantier_Changed. How can I avoid that?

            public void FormEvents_Loading(object sender, LoadingEventArgs e)
            {
                try
                {
    ...............
                }
            }
    
            public void drpChantier_Changed(object sender, XmlEventArgs e)
            {
                try
                {
    ...............
                }
            }

    thanks


  • 01-20-2014 07:42 AM In reply to

    Re: Infopath avoid method on form load

     You haven't given us much information here, but the drpChantier_Changed event will fire any time the associated field's value changes. What is it that you are trying to avoid, exactly?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-20-2014 07:47 AM In reply to

    Re: Infopath avoid method on form load

    I am trying not to enter the method drpChantier_Changed when I load the form, I would like to enter the method only when the dropdown is changed. I tried to remove the method from the InternalStartup so it doenst load when the form starts, but it also stopped loading when the dropdown is changed. public void InternalStartup() { EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading); //EventManager.XmlEvents["/my:mesChamps/my:SecCartouche/my:drpChantier"].Changed += new XmlChangedEventHandler(drpChantier_Changed); ........................ Thanks
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.