B
Bobby Edward
Pretty simple webform layout...
- Categories dropdownlist (used as a filter for gridview): ddlCategory
- Gridview
- DetailsView used ONLY for insert into the Gridview
(All of this is contained in an UpdatePanel - using Ajax)
In the InsertTemplate of the DetailsView I use a dropdown for "Category". I
want it to ALWAYS be the same as the Categories dropdownlist at the top of
the webform. So, I tried this, but it doesn't work...
Protected Sub ddlCategory_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles ddlCategory.SelectedIndexChanged
CType(dvInsert.FindControl("ddlCategoryInsert"),
DropDownList).SelectedIndex = ddlCategory.SelectedIndex
End Sub
If I debug I can see the SelectedIndex change, but it doesn't show up
properly.
Any idea why? Thanks!
- Categories dropdownlist (used as a filter for gridview): ddlCategory
- Gridview
- DetailsView used ONLY for insert into the Gridview
(All of this is contained in an UpdatePanel - using Ajax)
In the InsertTemplate of the DetailsView I use a dropdown for "Category". I
want it to ALWAYS be the same as the Categories dropdownlist at the top of
the webform. So, I tried this, but it doesn't work...
Protected Sub ddlCategory_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles ddlCategory.SelectedIndexChanged
CType(dvInsert.FindControl("ddlCategoryInsert"),
DropDownList).SelectedIndex = ddlCategory.SelectedIndex
End Sub
If I debug I can see the SelectedIndex change, but it doesn't show up
properly.
Any idea why? Thanks!