I will explain in details what I want exactly.

let say that I have 2 DropDownList controls with CascadingDropDown extender.

DropDownList 1 called car type with CascadingDropDown 1

DropDownList 2 called color with CascadingDropDown 2

For example I selected sport car from first DropDownList then CascadingDropDown 2 will list control 2 with colors available for sport car.

then I selected red color for second car after that I saved these information to the database.

later on I wanted to modify the record that have these value the red sport car so I will retrieve these value from the database the DropDownList 1 and DropDownList 2 which have CascadingDropDown externders. to what properties I should assign back these value to have to have first control with sport selected programmatically and second with red value selected programmatically.

Was it helpful?


That's one of the pains in working with Cascading Drop Down Lists. The dynamic loading makes it a little more difficult to set the proper values, if you need to edit a record (as opposed to add a new one) where the CDDL is used.

If I recall correctly (it has been a while since I last used it) you set the CDDL SelectedValue property. and then it will load the correct data upon rendering the page.

The CDDL takes care of this problem by itself in postbacks, but not in page loads.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow