Hi,
I've constructed a GridView inside an UpdatePanel. A TemplateField is used to create buttons (1 per row) which show a ModalPopup. The popup consists of an iframe and two buttons. The problem has to do with the binding of these buttons to OkControlID and CancelControlID.. When the GridView shows his first page, everything works fine. But as soon as I select another page of the GridView, the popup still shows up, but the buttons inside the popup don't react anymore. I don't get any script errors..
This is the relevant code:
<atlas:UpdatePanel runat="server" ID="GVUP" Mode="Conditional" RenderMode="Block">
<ContentTemplate>
<asp:GridView ID="GridView" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" SkinID="withSelect">
<Columns>
<asp:BoundField DataField="ProductID" HeaderText="ProductID" InsertVisible="False"
ReadOnly="True" SortExpression="ProductID" >
</asp:BoundField>
<asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" >
</asp:BoundField>
<asp:BoundField DataField="UnitsInStock" HeaderText="UnitsInStock" SortExpression="UnitsInStock" >
</asp:BoundField>
<asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" >
</asp:BoundField>
<asp:CheckBoxField DataField="Discontinued" HeaderText="Discontinued" SortExpression="Discontinued" >
</asp:CheckBoxField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btn_edit" runat="server"><img src="../../../App_Themes/Flexible/images/buttons/edit3.gif" /></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="MPE" runat="server" >
<atlasToolkit:ModalPopupProperties TargetControlID="btn_edit" PopupControlID="GVMP"
BackgroundCssClass="modalBackground" DropShadow="True" OkControlID="OkButton"
CancelControlID="CancelButton"/>
</atlasToolkit:ModalPopupExtender>
<asp:Panel ID="GVMP" runat="server" SkinID="modalPopup" style='display:none;'>
<iframe src="../PopUpMediatype.aspx?criteriafields=criteria_ID&criteriavalues=1" class="modalpopup"></iframe><br /><br />
<asp:Button ID="OkButton" runat="server" Text="OK" Width="50" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel" Width="50" />
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</atlas:UpdatePanel>
Does anyone has an explanation or solution for this?