dropdownlist cascading !!!!

Discussion in 'ASP .Net' started by Morgan, Sep 12, 2006.

  1. Morgan

    Morgan Guest

    hi everyone

    i trying to select a sub-categorie difined like:

    service
    |_category
    |_sub-category
    |_the presentation

    each of these are represented by a table in sql, and they identified by
    their id.

    sub-category know the id of his category
    and category know the id of his service

    so when i am trying to create detailsview, that represente a presentation,
    owned by a sub-category, i would like to use 3 dropdownlist in order to
    select the subcategory.

    can someone tell me a way to do it ?

    Morgan
     
    Morgan, Sep 12, 2006
    #1
    1. Advertising

  2. Morgan,

    Bind the first drop down list and set it to auto-postback. Then in its
    selected index changed event bind the next drop down list.

    Repeat this for each drop down list.

    This will allow the user to pick from each drop down list and then the next
    one will be generated. If the drop down lists aren't at the top of the page
    you'll want to use javascript to scroll back down the page after the post
    back so the user will still see the drop down lists. You may also want to
    use javascript to set focus on the next drop down list after the post back.
    If you need any help with javascript let me know.

    Regards,

    --
    S. Justin Gengo
    Web Developer / Programmer

    Free code library:
    http://www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche


    "Morgan" <> wrote in message
    news:...
    > hi everyone
    >
    > i trying to select a sub-categorie difined like:
    >
    > service
    > |_category
    > |_sub-category
    > |_the presentation
    >
    > each of these are represented by a table in sql, and they identified by
    > their id.
    >
    > sub-category know the id of his category
    > and category know the id of his service
    >
    > so when i am trying to create detailsview, that represente a presentation,
    > owned by a sub-category, i would like to use 3 dropdownlist in order to
    > select the subcategory.
    >
    > can someone tell me a way to do it ?
    >
    > Morgan
    >
     
    S. Justin Gengo, Sep 12, 2006
    #2
    1. Advertising

  3. Morgan

    David Wier Guest

    Here's one way, from ASPNet101.com:
    http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=ddl3MDB

    --
    David Wier
    MVP/ASPInsider
    http://aspnet101.com
    http://aspexpress.com



    "Morgan" <> wrote in message
    news:...
    > hi everyone
    >
    > i trying to select a sub-categorie difined like:
    >
    > service
    > |_category
    > |_sub-category
    > |_the presentation
    >
    > each of these are represented by a table in sql, and they identified by
    > their id.
    >
    > sub-category know the id of his category
    > and category know the id of his service
    >
    > so when i am trying to create detailsview, that represente a presentation,
    > owned by a sub-category, i would like to use 3 dropdownlist in order to
    > select the subcategory.
    >
    > can someone tell me a way to do it ?
    >
    > Morgan
    >
    >
     
    David Wier, Sep 12, 2006
    #3
    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. Yavuz Bogazci

    cascading menues with asp.net

    Yavuz Bogazci, Jul 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    Jay Balapa
    Jul 25, 2003
  2. Mikael Engdahl

    Cascading repeaters

    Mikael Engdahl, Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    584
    Ray Dixon [MVP]
    Aug 8, 2003
  3. Jim Heavey

    Cascading Style Sheet

    Jim Heavey, Nov 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    373
    Justin Musick
    Nov 19, 2003
  4. Herb Stull

    Cascading Style Sheets

    Herb Stull, Jan 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    356
    Herb Stull
    Jan 22, 2004
  5. Jacques
    Replies:
    3
    Views:
    458
    Adam Mather
    Jun 13, 2008
Loading...

Share This Page