.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

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

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. 



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?

Cascading Dropdowns Reload on Event Trigger



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?


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"  

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.

Issue in Infopath 2007 browser form - cascading dropdown using owssvr.dll filter view


Referring the below link, I created a cascading dropdown. The parent dropdown has sharepoint list as datasource and the child dropdown has xml datasource that points to owssvr.dll filter view. The cascading drop down works fine in preview but throws error after publishing as admin approved form - "form cannot run the specified query" exception when trying to execute xml datasource i.e., when a value is selected in parent dropdown. The security is 'Full Trust". In the event viewer the error message states "401 unauthorised" for the user a/c. the xml data source is an approved udcx file and in central admin, have enabled cross domain for infopath service. I have tried different solution provided in tech forums but issue still exists. Not sure whether Im missing something. Can someone guide me in fixing this issue?

Link Reffered:



cascading functionality in infopath 2007


Hello ,

I have a few drop downs in my browser based infopath 2007 forms and they  have cascading functioanlity ie they get filtered data..for filtering i qam using a web service..now the issue is that say i have 4 drop downs and for getting the fourt drop down's value the web service takes as input the second and the third's drop down value..now what is happening is that if based on the second drop down value if there is no value returned for third drop down then i cannot get to fourt drop down's value whichi should as it has value irrespective of whether the third drop down has some value or not....this is only the issue when i access the form in browser ..when i access it through the client infopath then it's working good...but in browser form the event is not firing when i select the emty value in third drop down...

Can somebody please tell me what to do..


Cascading Dropdown Question



I have 2 parent child cascading dropdowns on my form. At present they work as normal so you can only select a value from the second once you've selected one from the first, otherwise it's disabled. Is it possible to show all values in the second if you haven't selected anything from the first? Does that make sense?


Ajax Cascading drop down method error 500!


Sorry to trouble you all with something that has already been posted a million times but I have tried everything I can and stuck with for about 10 days now. Please help. I have created 2 tables Categories, Subcategories.

Categories table has Category_ID(Primary Key) and "Category" fields. Subcat table has SubcatID(Primary Key, Sub_cat and Category_ID(Foreign Key). Here's the code of the asmx file.

Service methods used in ASPX file ServiceMethod="GetVendors" and ServiceMethod="GetContactsForVendor". Please help me find the source of the method erro 500 and I will be very greatful.

<%@ WebService Language="VB" Class="CascadingDropdown1" %>

Imports System.Web.Script.Services

Imports AjaxControlToolkit

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports System.Collections.Generic

Imports System.Collections.Specialized

Imports System.Data.SqlClient

<ScriptService()> _
Public Class CascadingDropdown1
Inherits System.Web.Services.WebService

<WebMethod()> _
Public Function GetVendors(ByVal knownCategoryValues As String, ByVal category As String) As Cascadi

How can I Set default value for drop down list filled with Cascading

Hi AllI've this problem, how can I set the default value for drop down list filled with cascading. I can't catch the event that came after cascading to set the default value and I can't call any control in this function:  "AjaxControlToolkit.CascadingDropDownNameValue[]"   I've passed the Drop down list as a session and the default value in session   When I call the session of "Drop Down List" the session value Is NULL in this function:  "AjaxControlToolkit.CascadingDropDownNameValue[]"   Any help please. 

How to return back back to code behind file after cascading dropdown calling

Hi, I have a cascading dropdown. After the dropdown is populated(it is in another file)  i would like to return back to the original form where the control is placed. is there anyway of doing it

Adding group header in the cascading dropdown

Hi,   I have a cascading drop down, and in one of the dropdown i want to add a group header.    i,e suppose if i list the names (of girls and boys) i want to group them in a dropdown say(Girls and Boys as header under them the names)   Girls aaa bbb ccc Boys ddd gggt   Can anybody please help me

3 Cascading Filters

Hello ThereI have the following tables, country,state, city and companycompany belongs to city, city to state and state to country.I am developing the Company Screen with Dynamic Data. It has an idCity field.but I dont know how to make  that when users create a new row on the company table, or edit a new  one. It should show the 3 filtersCountry, State and City.Can somebody help me, I used dynamic data about 1.5 years ago and I dont remember a lot of things
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