.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

Cascading Dropdowns Reload on Event Trigger

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :ASP.Net


I have three cascading dropdowns and two of them need to trigger something outside of the dropdowns, so I have OnSelectedIndexChanged events on them.  So as to not reload the whole page when these items are triggered, I have all of this in an Update Panel.

Everything works fine -- the only issue that the client doesn't like is that the cascading dropdowns reload on the asynchronous postback.  Can you think of any way to avoid this?


View Complete Post

More Related Resource Links

IP2003 cascading dropdowns w/SP2007

I'm new to IP.  My client base is IP2003 only on SP2007.  The forms have repeating data sections so web form is out of the question as I understand it. :(  

The forms are run on the clients local version off IP.  I would like to use a SharePoint list as the basis for some cascading drop downs.  Is that a realistic idea in IP as described? 

Displaying IDs in cascading dropdowns

Hi, I am using sharepoint RTM on windows server 2008 sp2, i have implemented Cascading dropdown scenario by reading the following blog: http://msdnvietnam.net/blogs/quang/archive/2010/03/30/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010.aspx I am having a problem that if i select the City Dropdown for the first time, then it works fine and cascading works fine but if i reselect (or select another city) then the value selected in District dropdown loads the respective items but the previous selection Id is also displayed. e.g, I select City1 from City DropDown, District dropdown shows District1 Name(ID = 1) and District2 Name (ID = 2) Then I select District2 Name then I select City2 from City DropDown, District dropdown shows "2" (District2 ID) and District3 Name and so on. Can anybody help me with this....

Creating cascading dropdowns - Unable to add filter

Hi all ! I'm trying to learn about how to create cascading dropdowns.In fact I found good explainations, but something very weird is happening... When I click on the filter (using external datasource) a message like 'There is no support atr the web form of infopatrh 2007 for filter' (or something like this).Then the buttons to add, modify, etc appear disabled to me. Any hint, felas ?

infopath 2007 cascading dropdowns



Can anyone suggest me the Infopath cascading dropdowns. I need to create one form ...it will have 3 dropdown and based on the users selection in the first dropdown 2nd dropdown should display only one item (out of 3 standard items..users dhould see only one item int he dropdown). based on the user's selection wrd dropdown should show 2 items (out of 5 standard items....users should see some items only based ont he first dropdwons selected value). Can anyone one suggest how to accomplish this?. Thanks in advance to all.

Cascading dropdowns without JavaScipt/jQuery


I have 2 dropdown's in my form in a view.  (Countries and regions)

Obviously I need the regions dropdown to change it's content whenever the countries list have been change.

However, I do NOT want to do this with any dependancy on JavaScript.

Did not do webforms for years, but remember one let the dropdown postback the form.  I dont think it work like this in MVC, as posting my form will force validation to kick in to easy, and the user see a lot of "error messages" just because they are selecting their country and region?

Any advice / tips / links?

Prevent postback but need to trigger an event



Is there a way that to prevent a postback on button click? But at the same time, when click on the button, it should be able to trigger a function.

I want sometime like Onclick = "runFunction", but to disable the postback.


How to trigger a JavaScript function using "onmouseover" event on a SPMenuField control?



I could do something along these lines for TemplateField (with ItemTemplate having a HyperLink control):

private void Grid1_RowDataBound(object sender, GridViewRowEventArgs e)
     if (e.Row.RowType == DataControlRowType.DataRow)    
          ((HyperLink)e.Row.FindControl("lnk_id")).Attributes.Add("onmouseover", "someFunction();");    

For SPMenuField, which control should I set the "onmouseover" event to?



trigger an automatic sharepoint site provision event from within Office project 2010



can anyone give me an idea on what i could do to automate the site creation in sharepoint when i press the sync button in project ? thanks

Still issue with Cascading Dropdowns


I have looked at the post on http://www.dotnetcurry.com/ShowArticle.aspx?ID=221 and got this to work somewhat.  I have 2 fields just like the example.   One is Location and the other is Lab.  I can have multiple locations, and within the locations, multiple labs for each location.  So when I select a Location, I want to show all labs for that location.  This part works.  But when I click Update, I the Lab value is not getting written back to the database.  I suspect it is because I dont have a SelectedValue='<%# BIND' but when I add one, I get an error.  Also, in the example post above, he does not have one either. 

The code for the Lab field is below.  What am I doing wrong.  This cant be that difficult. 



<asp:TemplateField HeaderText="Lab" SortExpression="LAB">
                            <asp:DropDownList ID="gvLABS_DROPDOWN" runat="server" DataSourceID="SqlDataSource8"  

Notify jquery from server (trigger an asynchronous client side event from the server).



I want to have a code that would establish connection from the server to the jQuery client, to update the front page of the website, when some new data is added to the DB. I of course could have an ajax call from the client on every second to check up the database for any changes, but I am just wondering if there is any way to establish a connection from the server side to the client.

The perfect solution would work like that:

- when the page is open, the client registers itself on the server for changes

- the server (knowing all the registered clients) prompts all of them when a change is done

- if any of the clients does not respond, the server removes the client from the registered list

- clients, update the page contents with the new data from the server

The question is if it is possible? Again, I could make all the clients reconnect to the server every second using ajax, however, this does not seem like a clean solution, and additionally it would put an unnecessary load on the server (e.q. 100 clients requesting update every second).

Thanks in advance,

Jozef A. Habdank

Add rows dynamically to a table and poulate data in cascading dropdowns

hi,I am using ASP.NET3.5,
I want to Add rows dynamically to a table.I am using masterpage in my .aspx pages.
I have written the following code code.This code is working fine.
but I need to load data in dropdownlist2 dynamically based on another dropdownlist1.and i need to do few calculations based on table data.
but how can I do using  javascript/jquery/Ajax ??
can i do all my calculations using these html controls?

1  dynamically Add rows to table.(which doesnt give burden to server)
2  need to use cascading dropdowns (like Country,States,villages )
3  Have to do some calculations (like Tax calculations based on table data)
4  Have to enable/disable few controls base on input data of dropdowns and textboxes.

    <TITLE> Add/Remove dynamic rows in HTML table </TITLE>
    <SCRIPT language

Cascading Dropdowns with Dynamic Data


Hi there,

 I need to disable a dropdown depending on the selected value of another dropdown in my detailsview in edit mode.

 I had previoulsy created a file enumeration_edit.ascx so that I would be able to bind a list of names to this dropdown but now that we have a new type of user I want to disable this dropdown when a different user type is selected.

I was thinking of adding a simple 'if' statment when binding the list to the dropdown but I'm not sure how to get the other dropdown's selected value from inside enumeration_edit.ascx.


Appreciate some feedback.

trigger event to make tree view item bold


Hi guys, I need some help with a treeview item and stuff again. 

Right now I am using isSelected as the trigger, to make the items bold when clicked. But i have a few items, like say 5, all named one,two,three, etc.. but at the moment I'm only able to apply the bold effect when selected to 'one'.I'm not able to apply it to the other few.

 I am currently using XAML to do this, I'm thinking C# would be able to solve my problems, but how do i go about doing this?  Please helppp. Thank you so much. Attached below is the screenshot.



cascading dropdowns


Hi - is there a way to do cascading dropdown lists with dynamic data when editing?  For example, a "City" dropdown would be populated based on the drop down selection in the "State" dropdown. 



Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

how to impose javascript event processing?


If I have some form control like textbox and I want the event handler to be located in the html instead of at the server side, how to do that? Of course I can copy paste javascript code in the aspx file. But is it possible to do that using some object oriented approach (ie programmatically in the code behind)?


Dropdown Event (Template Field)



I have grid view control that includes a dropdown control in a template field.

I wish to execute some code when the value is changed in the dropdown list.  Can't figure out how to capture this event though?

Any suggestions?

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