View Single Post
  #6 (permalink)  
Old June 15th, 2010, 02:27 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Isn't that simply a matter of hiding the second and third control at first by setting Visible to false and showing them only when their DataBound event is fired?

But there are many solutions outside the CascadingDropDown (which really makes things a lot simpeler).

1. Use your own code server side
Set AutoPostBack on the first DDL to true. In it SelectedIndexChanged event get the selected item, get relevant items from the database and bind them to DDL2. Additionally, show DDL2. Repeat that for the combination of the second / third DDL.

2. Use jQuery and AJAX calls and build up the list client side
A lot has been written about this so you may want to Google a bit until you find an article you like and can use. Here's a start: http://www.dotnetcurry.com/ShowArticle.aspx?ID=417

3. Use third party controls
Commercial software vendors often have controls for this scenario. Again, Google should bring up useful stuff.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!