.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

InfoPath drop down list's Changed event does not occur when viewed in browser

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :SharePoint




I have the following problem:


On my InfoPath form, I have a drop down list that contains cities, and based on the selection of the user, I would like to pre-fill some fields on the form, like telephone and fax number, address of the company, etc. I have written an event handler that is run each time the selection in the drop down list changes. But when I publish the form on the SharePoint server, this functioanlity seems to be lost. If I change the selected item in the drop down list, nothing happens; whilst in the InfoPath client everything runs as expected.


Why does this happen? Is the drop down list's Changed event unavailable in a browser-enabled form? Is it possible to catch this event at all?


Thanks for your reply,


View Complete Post

More Related Resource Links

Infopath Changed Event code triggering in preview but not in web filler.

Hi there, I've written some code for a changed event hookup on a field in infopath 2010. The form is for submission to a sharepoint 2010 forms library. What the code does is fill in a specific value into a field depending on the selected value from a combo-box elsewhere on the form. When i preview this in Infopath 2010 it works perfectly but when i fill out the form through the web interface it simply does nothing. I've got another piece of code which executes on load and this works perfectly in both the preview and the web filler. What it does is just set the value of a field when the form loads. Here is the code, could someone tell me what i'm doing wrong? public void InternalStartup() { EventManager.XmlEvents["/my:myFields/my:service_level"].Changed += new XmlChangedEventHandler(service_level_Changed); EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading); } public void service_level_Changed(object sender, XmlEventArgs e) { // Write your code here to change the main data source. XPathNavigator xroot = MainDataSource.CreateNavigator(); XPathNavigator serviceLevel = xroot.SelectSingleNode("/my:myFields/my:service_level",NamespaceManager); XPathNavigator xest = xroot.SelectSingleNode("/my:myFields/my:est_cost", NamespaceManager); switch (serviceLevel.Value)

Browser enabled - Use One Drop Down List for Mutliple Drop Down List

I kind of have a cascading drop down, but I cannot figure out how to make filter all the other drop down list. I have seen this URL http://blueoceansassociates.wordpress.com/2008/11/19/cascading-drop-downs-in-infopath-web-forms-made-easy/, but is there a way to use only one Drop Down List as the dataconnection for all other drop down list. I have one drop down that needs to associate with 3 others. All 4 list point to a Sharepoint Secondary Data Source. Each drop down list is associated with the first drop down list choice. I have not seen this out on the web. Thanks for your response. chrisdoran

cascading drop down list in infopath forms services Using SharePoint Look up list from multiple Sh



Some one can help me, if possible screen shots.
Environment : MOSS 2007, InfoPath 2007

Button On client click event Loads Drop Down List


Hello All


Right now my ASP page has a text box and a submit button, what I am trying to do is once the user hits the submit button load a drop down list.


The drop down list should not be visible before the submit button is pressed


Thanks in advance 

Changed Event InfoPath Web forms



I am working with InfoPath 2010 and designing a web data entry form that requires data validations in the repeating table section of the Form.

The repeating table is bound to a web service and is populated with the return value of the service. I have added a handler to the changed event of the various text boxes that contain the data which validates the type of data entered and adds to the formerror collection if the data type is incorrect. This works perfectly when previewing and testing the Form. When I publish the form to sharepoint. not only do I not see the validation rectangle in the text box, but I the error is not added to the formerror collection. 

The funny thing is that if I add a very simple task to the event handler like modifying the value of a dummy textbox that part of the function works and the remaining part of the function simply does not execute.

Is there a way to debug this when browsing in SharePoint?

Has anybody come across a similar type of issue?



Capturing status changed event in Task List


I currently have a custom workflow which was designed using SharePoint Designer 2007 that is attached to a document library.  As part of the workflow, a task is created in a Task List.  However, when the status of the Task in the Task List has changed, I have not been able to capture that event from within my SharePoint Designer workflow in order to continue with other actions within the workflow. 

Is there something that I need to do in order to be able to handle the status changed event in the Task which was initially triggered and created by my Document Library workflow?


file attachment control on infopath 2010 browser form, validating event not fired


If preview within InfoPath 2010, the validating event is fired. But After deploying the form to SharePoint 2010, the validating event does not fire.

Any ideas?


Blog: http://convergingpoint.blogspot.com/

Infopath browser view ignores change event handler

I have several radio buttons. On change, XmlChangedEventHandler  will perform some actions.  It works fine on InfoPath .  But it doesn't work on web browser.  After I click a radio button, nothing changes until I click on an irrrelevant button, all the changes all of a sudden show up.

How to remove blank item from infopath form in drop down list



how to remove the blank item from the drop down box which is used in infopath form..




Alphabetical order in infopath drop down fails for sharepoint list dataconnection, but it works in p


Hello Experts,

I am using Sharepoint List dataconnection to retrive the drop down in Infopath form & configured several rules to retirve data for other fields based on Id value selected in drop down.

when i modify the list view to display items in alphabetical order, Then i can see the infopath preview mode to display drop down in alphabetical order. But when i deploy as administrator approved XSN in Sharepoint, it doesnt show the alphabetical order which was shown in the preview mode.

How to achieve the alphbetical order in browser enabled forms were it works in preview mode but not when we deploy in sharepoint  ?

Thanks !




Way of adding items in Drop Down List or List Box using Javascript

The article Way of adding items in Drop Down List or List Box using Javascript was added by raja.s on Sunday, June 06, 2010.

Hi,script type="text/javascript"> function AddItem(Text,Value) { // Create an Option object var opt = document.createElement("option"); // Add an Option object to Drop Down/List Box document.getElementById("DropDownList"

How to use a drop down list to edit in the standard Edit.aspx with DD?


Hey All,

I'm brand new to Dynamic Data and to ASP.NET.  I've been able to fumble around and get the calendar extender up and running and a few other customization options implemented, but I can't seem to get this drop down list to work - even after reading tons of online info.  The good news is that my web page/application is VERY simple, so hopefully you guys can help me out.  I'm working in VB btw.

I have a list of road projects submitted to me by local governments.  One of the fields is SponsoringAgency, which has a limited number of possible entries (the names of member governments).  Thus, when they submit a new project, or edit an existing one, I want to limit the input into the field "SponsoringAgency." I'm trying to use a dropdownlist because I'm familiar with it from Access, but it may not be the best approach.  Imagine you just setup a brand new, standard DD website, how would you get this to work?

Methods tried and failed (probably because I don't understand them fully):

UIHint - The closest I can get with this is an error saying that since SponsoringAgency isn't a Foreign Key, I'm out of luck.

Creating a SponsoringAgency Table - In my data layer, I created a second table with a list of government names.  I then tried se

FormView Text Field Being Set by A Drop Down List


Hello, I have a FormView which is used to insert a record into a database.  Outside of this formview i have a drop down list, I want to grab the value from that drop down list and set one of the text fields within the formview to it's currently selected value.  I've tried the following code, but the dynamic categorytextbox line is what seems to not be working.

                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
DataSourceID="SqlDataSourceCategory" DataTextField="CategoryName"
DataValueField="CategoryID" Width="200px">

                            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
Text='<%# Bind("CategoryID") %>' Visible="False" />

        protected void FormView1_DataBound(object sender, EventArgs e)
dynamic varCategory = ddlCategory.SelectedValue;
dynamic categoryTextBox = FormView1.FindControl("CategoryIDText

InfoPath Workflow Task Form "Loading" event handler only being called after App Pool recycled.


I have a Workflow that is using an InfoPath task form.  In the "FormEvents_Loading" method event handler I have some code that needs to run each time the form is opened.   I recycle the App Pool and open the form the code runs perfectly, but if I close and try to re-open the form the code is not run at all.  I can then recycle the App Pool again and on the next load the code executes just fine.   The code that is supposed to be run is a very simple statement to set a field value, so I don't think it is interfering.

Does anyone know what this might be?


Attachment upload error on browser based InfoPath form



I am having an interesting problem with browser based InfoPath forms in SharePoint 2007.  For some reason the file attachment control is not working any more.  It was working fine in July, but now it will not allow file attachments over a few kb.  I tried a 34KB file and I get the error below, a 2KB file works fine.

Unable to connect to SQL Server session database. The connection string (server='SPDB', database='SharedServices1_DB') was returned by an instance of the IPartitionResolver type 'Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.   at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
   at System.Web.SessionState.SqlSessionStateStore.HandleInsertException(SqlConnection conn, Exception e, Boolean newItem, String id)
   at System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
   at System.Web.HttpApplication.SyncEven

Infopath 2007 print view in browser enabled form with Print button


Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?

Populating a list box in InfoPath from a sql stored proc


I have an InfoPath web enabled form that gets published to a SharePoint site.  I need to add a list box to the form that gets populated with data returned from an existing call to a SQL Stored Proc.  

As the form works now, the user types in a patient id #, then clicks a button that calls the Stored Proc and returns any patients that match the given patient ID.  This part works.  

My task is to add a list box so that if more than one patient is returned , display the list box with all of these patients populated in it.

I am hoping to do this within the confines of the existing code.  The existing code looks like this:

private bool LoadPatientInformationFromDB(string patientId, string patientFirstName,
      string patientLastName, string patientMiddleInitial, string birthDate, string gender,
        string admitDate, string location)
      bool completed = false;
      //Load from DB
      SqlConnection conn = new SqlConnection(GetOrderSetDBConnectionString()); 
      //Create Form Builder
      formBuilder = new FormBuilder();
      SqlDataAdapter adpt = null;
        if (!String.IsNullOrEmpty(patientId) || !String.IsNullOrEmpty(patientFirstName) ||
          !String.IsNullOrEmpty(patientLastName) || !String.IsNullOrEmpty(patientMiddleInitial)
          || !St
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend