Gridview sorting and paging events are not firing in embedded .ascx controls
<p>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.  </p>

<p>Any idea what on earth is going on here?  For edification, the .ascx page with the control is excerpted.</p>

<p>Parent .ascx control:</p>

<pre><code>&lt;asp:ScriptManager ID="smIndex" runat="server" EnablePartialRendering="true" EnableScriptLocalization="true" EnableScriptGlobalization="true" /&gt;
</code></pre>

<p>
    
        
    
</p>

<p>Child .ascx control:</p>

<pre><code>&lt;asp:UpdatePanel ID="upAddAdj" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional"&gt;
&lt;ContentTemplate&gt;
    &lt;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"&gt;
</code></pre>

<p>In the child.ascx code-behind:</p>

<pre><code>gvAddAdjVenList.DataBind();
gvAddAdjVenList.Sorting += new GridViewSortEventHandler(gvAddAdjVenList_Sorting);
gvAddAdjVenList.PageIndexChanging += new GridViewPageEventHandler(gvAddAdjVenList_PageIndexChanging);
</code></pre>

<p>Thanks!</p>

<p>valkyrie</p>
