problem populating gridView on dropDownList

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two dropDownLists A and B outside a gridView.

A selection made in ddlA causes ddlB to be populated with data from the
database. The gridView is populated with data according to a selection in
ddlB.

ddlA --> ddlB --> gridView

When a user selects an item in ddlA, I want
(a) the ddlB to be populated automatically
(b) the gridView to be populated automatically based on the first item in
ddlB.

I have two problems:
1. the (b) part doesn't work;
2. if ddlB contains only one item, the item cannot be selected even by
clicking on it.

Thank you for your suggestions.
 
You could try to also populate the gridview after ddlB is DataBound,
based on its SelectedItem (if it has one, that is).
 
Back
Top