473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

dual drop downs

I have 2 drop downs on my web page and this will allow the user to filter the
data on one drop down or both. How can I link these dropdowns together to
allow the user to filter on one or both?

example:
drop down one is cars:

BMW
Lexus
Mercedes

dropdown 2 is type
SUV
Sedan
Coupe
Convertiable

if the users selects BMW then i want to see all BMW's all models, if they
select Coupe then i want to show all coupes all makes. BUT if they select BMW
-- Coupe I want to see all BMW coupe's, how can I accomplish this? I have the
one filtering but i need to add the second drop down for possible filters.

Nov 19 '05 #1
1 1356
Make both dropdowns have autopostback= true. Then double click each control
for the default selection changed event.

Have the dropdown1's event get its current value and use that to get a new
array/datatable. Rebind that array to dropdown2.

Have dropdown 2 do the same thing - add the autopostback, add code in event
to get its current value and use that to get the array/datatable for
dropdown1, then rebind that data to dropdown1.

"Mike" wrote:
I have 2 drop downs on my web page and this will allow the user to filter the
data on one drop down or both. How can I link these dropdowns together to
allow the user to filter on one or both?

example:
drop down one is cars:

BMW
Lexus
Mercedes

dropdown 2 is type
SUV
Sedan
Coupe
Convertiable

if the users selects BMW then i want to see all BMW's all models, if they
select Coupe then i want to show all coupes all makes. BUT if they select BMW
-- Coupe I want to see all BMW coupe's, how can I accomplish this? I have the
one filtering but i need to add the second drop down for possible filters.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
1
by: Martial Spirit | last post by:
Hello- I was amazed at the suckerfish drop-downs from AListApart.com. They work great except for one thing, if I position the drop-downs over an iframe element, on mouseover the menus disappear....
8
by: Kim14 | last post by:
Help! I am trying to create a webpage and it would be obvious to anyone who reads my source code (it's a mess) that I created it using a template. I know almost nothing about webpages, but am...
1
by: Joe Dunleavy | last post by:
Hi Guys, Hopefully some one will have come across this issue already. I have a DataGrid inside a Div where a scroll bar displays once a certain height is meet --> <div id="dvSales"...
2
by: Woody Splawn | last post by:
I have a question about technique with regard to filling drop downs. I have a Winform that has several different tabs and tables associated with it. In an effort to keep the load time small I...
3
by: CSharpguy | last post by:
I have 3 drop downs that are populated from the databasem 4 of my web pages need to have this drop down, how can I trap the selection made in the drop down and popuate my grid on my form?
2
by: John | last post by:
I have CSS drop down navigatoon bar and it works fine. However, when I have page where I have an <embed - needed to show a PDF file, such as: <embed src="Security.pdf" width="900"...
0
by: ehsanen | last post by:
I have some text boxes and drop downs on my web page and now i want to put a button in my webpage that when the user clicked the buton the page itself add another row of textboxes and drop downs , in...
1
by: JackInDaBox | last post by:
Hello, I am new to this and have run into a small problem. I am using the Ajax toolkit with VS 2005 to fill some drop downs through a web service and it works great. All of the cascading drop...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.