dropdownlist cascading !!!!


M

Morgan

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
 
Ad

Advertisements

S

S. Justin Gengo

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
 
Ad

Advertisements


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top