Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > dual drop downs

Reply
Thread Tools

dual drop downs

 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      03-09-2005
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.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VGltIFN0YWxs?=
Guest
Posts: n/a
 
      03-09-2005
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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
1st Drop-down selection determins selected value in all drop-downs In ASP.Net Wizard jaysch ASP .Net 0 04-30-2011 02:19 PM
dual boot xp/xp64bit slow shut downs Nicholas Baker Windows 64bit 4 02-05-2010 03:45 AM
Linking 2 Drop Downs and Repeater Control BryanS ASP .Net 0 03-16-2005 02:21 PM
list of drop downs JohnZing ASP .Net 0 01-30-2005 07:09 PM
Need Script For Drop Downs Davmagic .Com Perl 0 10-14-2004 03:25 PM



Advertisments