in

InfoPath Dev

How to Manually Trigger "Changed_event" in Behind Form code

Last post 09-06-2007 03:50 AM by spudy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-05-2007 11:07 PM

    How to Manually Trigger "Changed_event" in Behind Form code

    Hi guys,

    Situation:  I'm building a drop down list using "changed_event" in behind form code (which uses a data connection via Web Service).  However, the user can upate or add new values to the drop down and for that I've a refresh button which updates the data connection with these recent updates.

    Problem:  Since the drop down list is builded on "Changed_Event" then how can I trigger it from let's say "rfresh" button_clicked event in behind the form code.

    Possible Solution:  Let's say if I've two methods in behind form code

    public void List_Changed(object sender, XmlEventArgs e)

    public void Refresh_Clicked(object sender, ClickedEventArgs e)
    {
           List_Changed(sender, e)   <---------- how can I convert these parameters to the ones that List_Changed requires????
    }

    Any ideas or other ways around is greatly appreciated.

    Filed under:
  • 09-06-2007 03:50 AM In reply to

    • spudy
    • Top 75 Contributor
    • Joined on 03-23-2006
    • United Kingdom
    • Posts 67

    Re: How to Manually Trigger "Changed_event" in Behind Form code

    I am presuming your dropdown list is bound to a webservice and there is a field(textbox?) where a user types a new value to be added to the dropdownlist. An event then occurs that updates the datasource (webservice). At this point then you wish to have the dropdown list updated?

    I would manage this using a rule on the field(textbox?) where the value of the field changes(and is not blank) uses an action to submit to the webservice is made. Immediately after this action use another action to query the webservice afresh using the same dataconnection that is used to populate the dropdown.

    Hope I haven't missed the point completely..... 

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