Gridview with 2 DDLs - how to filter contents of 2nd DDL based on selection in 1st RRS feed

  • Question

  • I have a gridview bound to a LinqDataSource. There are 2 columns in the GridView with a dropdownlist in each. Each ddl is bound to a LinqDataSource. The 1st ddl contains a list of categories. The 2nd ddl contains a list of products. Each product has a category, and I want the selection made in the 1st ddl to narrow the available choices in the 2nd. The selected value in the products ddl is bound to gridview's datasource and therefore automatically saved.

    I have set up events to handle the 2 cases when I need to filter the product ddl's data: the gridview's RowDataBound event, and the category ddl's SelectedIndexChanged. But how do I pass the category ddl'sSelectedValue into the product ddl's datasource's Where clause and refresh it?
    Tuesday, March 24, 2009 1:05 AM

All replies