dual drop downs

Discussion in 'ASP .Net' started by =?Utf-8?B?TWlrZQ==?=, Mar 9, 2005.

  1. 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.
     
    =?Utf-8?B?TWlrZQ==?=, Mar 9, 2005
    #1
    1. Advertising

  2. 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.
    >
     
    =?Utf-8?B?VGltIFN0YWxs?=, Mar 9, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davmagic .Com

    Need Script For Drop Downs

    Davmagic .Com, Oct 14, 2004, in forum: Perl
    Replies:
    0
    Views:
    473
    Davmagic .Com
    Oct 14, 2004
  2. JohnZing

    list of drop downs

    JohnZing, Jan 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    425
    JohnZing
    Jan 30, 2005
  3. BryanS
    Replies:
    0
    Views:
    448
    BryanS
    Mar 16, 2005
  4. =?Utf-8?B?Sm9lIER1bmxlYXZ5?=

    Fixed Header on a Data Grid using CSS - problem with Drop downs

    =?Utf-8?B?Sm9lIER1bmxlYXZ5?=, Oct 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,877
  5. jaysch
    Replies:
    0
    Views:
    1,276
    jaysch
    Apr 30, 2011
Loading...

Share This Page