I have been fighting this for an embarrasing amount of time and need some help. Here is the scenario: I have two dropdowns and a Gridview embedded inside a Panel. I want updates to be chained. In other words...
1. Select Item from dropdown#1 (w/AutoPostBack), then inside "SelectedIndexChanged" event: Dropdown#2 gets loaded, the first item is selected, CookieParameter to SQLDataSource "FilterParameter" is set to the new value in Dropdown#2.
Results: The grid gets populated, but the FilterParameter is not applied to the GridView for the currently selected item in DD#2. If I Refresh the page again then the Filter is applied. If I change the item in DropDown#2 (w/AutoPostBack) then the Gridview always populates with the prior item, not the currently selected one. It's like the Gridview is always seeing the previous CookieParameter, not what is currently in DD#2.
I was forced to use the CookieParameter because the DD#2 ControlParameter was falling out of scope with the Gridview I think because of the Panel the Gridview is buried in.
Attempted Remedies:
I have reset the CookieParameter in the PreRender event of the grid, and many other events, but it still doesn't work. Does anyone know how I can ensure that the latest item selected in DD#2 gets applied to the GridView data being returned?
Thanks!
Tom