I have a gridview that's inside a .ascx control that's dynamically embedded into another .ascx control, which is then called by a web form. The gridview will initially bind, but when any paging/sorting/command events are then triggered, I can't get any breakpoints inside the events to kick off. Additionally, when I look at the code-behind in the now-blank page, I see the old data sitting there.
Any idea what on earth is going on here? For edification, the .ascx page with the control is excerpted.
Parent .ascx control:
<asp:ScriptManager ID="smIndex" runat="server" EnablePartialRendering="true" EnableScriptLocalization="true" EnableScriptGlobalization="true" />
Child .ascx control:
<asp:UpdatePanel ID="upAddAdj" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvAddAdjVenList" runat="server" AllowPaging="true" AllowSorting="true" Width="100%" AutoGenerateColumns="false" Font-Size="9px" Font-Names="Verdana" PageSize="10" EnableSortingAndPagingCallbacks="false" DataKeyNames="ID" PagerSettings-Mode="NumericFirstLast" OnRowDataBound="gvAddAdjVenList_RowDataBound" Visible="true">
In the child.ascx code-behind:
gvAddAdjVenList.DataBind();
gvAddAdjVenList.Sorting += new GridViewSortEventHandler(gvAddAdjVenList_Sorting);
gvAddAdjVenList.PageIndexChanging += new GridViewPageEventHandler(gvAddAdjVenList_PageIndexChanging);
Thanks!
valkyrie