TabPanel GridView中的modalpopupextender问题 [英] Problem with modalpopupextender in gridview in tabpanel

查看:91
本文介绍了TabPanel GridView中的modalpopupextender问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在gridvew中使用modalpopupextender在弹出窗口中显示所选提供者的专业.这适用于除gridview的第一行以外的每一行.我无法在代码的第一行中触发任何事件,并且显示空的模式面板.当我单击gridview上任何其他行上的linkbutton时,将触发代码背后的事件,并且弹出面板中将显示特殊信息. (当使用带有链接按钮的中继器而不是gridview时,我得到相同的结果.)请注意,我也在使用分页和选择"按钮. (当我尝试使用编辑"命令时,由于modalpopupwindow似乎会覆盖其他命令,因此分页不再起作用.)有人遇到此问题吗?预先感谢您可以给我的任何建议.

I am using a modalpopupextender in a gridvew to display the selected provider''s specialties in a popup window. This is working for every row, except the top row in the gridview. I can''t get any events in the code behind to fire for the first row, and the empty modal panel displays. When I click the linkbutton on any other line on the gridview, the event in the code behind fires and the specialties display in the popup panel. (I had the same result when using a repeater with a linkbutton instead of the gridview.) Please note I am also using paging and the Select button. (When I tried using the Edit command, paging no longer worked since the modalpopupwindow appears to override the other commands.) Has anyone had this problem? Thanks in advance for any suggestions you can give me.

<asp:UpdatePanel ID="upnlGvProvidersAssigned" runat="server" UpdateMode="Conditional">
     <ContentTemplate>
         <asp:GridView ID="gvProvidersAssigned" CssClass="Grid" runat="server" AutoGenerateColumns="false"

             HeaderStyle-CssClass="GridHeader" AlternatingRowStyle-CssClass="GridAltItem"

             PagerStyle-CssClass="GridPaging" RowStyle-CssClass="GridItem" AllowPaging="true"

             PageSize="5" EnableViewState="true" OnSelectedIndexChanged="gvProvidersAssigned_SelectedIndexChanged"

             OnPageIndexChanging="gvProvidersAssigned_PageIndexChanging" DataKeyNames="ProviderID">
             <Columns>
                 <asp:CommandField ShowSelectButton="true" SelectText="Unassign" ButtonType="Button"

                     CausesValidation="false" ControlStyle-CssClass="button" />
                 <asp:BoundField DataField="ProviderID" HeaderText="Provider ID" />
                 <asp:BoundField DataField="Title" HeaderText="Title" />
                 <asp:BoundField DataField="LastName" HeaderText="Last Name" />
                 <asp:BoundField DataField="FirstName" HeaderText="First Name" />
                 <asp:BoundField DataField="Middle" HeaderText="Middle Name" />
                 <asp:BoundField DataField="NPI" HeaderText="NPI Number" />
                 <asp:TemplateField HeaderText="Specialties" ShowHeader="true">
                     <ItemTemplate>
                         <asp:LinkButton ID="btnSpecialties" runat="server" CausesValidation="false" OnCommand="btnSpecialties_Clicked"

                             Text="Specialties" CommandArgument='<%# Eval("ProviderID") %>'></asp:LinkButton>
                     </ItemTemplate>
                 </asp:TemplateField>
             </Columns>
         </asp:GridView>
         <ajax:ModalPopupExtender ID="mpeSpecialties" runat="server" TargetControlID="ctl00$ContentPlaceHolder1$tabGroup$tpnlProvider$gvProvidersAssigned$ctl02$btnSpecialties"

             PopupControlID="pnlSpecialties" BackgroundCssClass="modalbackground" DropShadow="true"

             OkControlID="btnOK" PopupDragHandleControlID="pnlSpecialties" Drag="true">
         </ajax:ModalPopupExtender>
     </ContentTemplate>
 </asp:UpdatePanel>
 <asp:UpdatePanel ID="upnlProvidersAssigned" runat="server" UpdateMode="Conditional">
     <ContentTemplate>
         <asp:Panel ID="pnlSpecialties" runat="server" CssClass="modalpopup">
             <asp:Label ID="lblProviderName" runat="server"></asp:Label>
             <asp:GridView ID="gvSpecialties" CssClass="Grid" runat="server" AutoGenerateColumns="false"

                 HeaderStyle-CssClass="GridHeader" AlternatingRowStyle-CssClass="GridAltItem"

                 PagerStyle-CssClass="GridPaging" RowStyle-CssClass="GridItem" DataKeyNames="SpecialtyID">
                 <Columns>
                     <asp:BoundField DataField="Name" HeaderText="Specialty" />
                     <asp:BoundField DataField="ServiceName" HeaderText="Service" />
                 </Columns>
             </asp:GridView>
             <asp:Button ID="btnOK" CssClass="button" runat="server" Text="Close" />
         </asp:Panel>
     </ContentTemplate>
 </asp:UpdatePanel>

推荐答案

ContentPlaceHolder1
ContentPlaceHolder1


tabGroup


tpnlProvider
tpnlProvider


这篇关于TabPanel GridView中的modalpopupextender问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆