views:

33

answers:

1

In my listview object insert/edit template, I have two dropdownlists (category, subcategory). When a user selects a category (autopostback), I would like the subcategory dropdown to filter to only the those that match the categoryID from the category ddl. This seems to be complicated by the fact that it is in a listview object. I'm currently using a queryextender on the subcategory datasource, but I'm not sure how to apply the selectedvalue of the category to the queryextender. The subcategory just shows all items and is not filtered. How do you accomplish this? Thanks.

A: 

It sounds like you are trying to accomplish something made easy by the CascadingDropDown extender in the Ajax Control Toolkit.

Check it out here: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx

What makes this solution appealing is that you may find it unnecessary to have the category list auto post back.

kbrimington
I can confirm that the CascadingDropDown control/service does in fact work properly inside a bindable control such as a listview.
Bay Wolf