ModalPopupExtender within Gridview inside UpdatePanel: paging problems

Last post 10-25-2006 8:13 PM by Ted Glaza [MSFT]. 1 replies.

Sort Posts:

  • ModalPopupExtender within Gridview inside UpdatePanel: paging problems

    10-17-2006, 4:14 AM
    • Loading...
    • DeXX
    • Joined on 04-10-2006, 4:17 PM
    • Posts 1

    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&amp;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?

  • Re: ModalPopupExtender within Gridview inside UpdatePanel: paging problems

    10-25-2006, 8:13 PM

    Hi DeXX,

    Check out this blog post by David that has a detailed example of using a ModalPopup inside a databound control.

    Thanks,
    Ted

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter