我创建了一个内部有详细信息视图的弹出窗口;但是,我需要能够翻阅几个记录,而不必关闭弹出窗口,但我似乎无法使其工作。任何关于我所缺少的想法都将不胜感激。
这是弹出扩展器的代码:
<asp:SqlDataSource ID="OtherJODS" runat="server" ConnectionString="<%$ ConnectionStrings:eventschedulerConnectionString %>" SelectCommand="SELECT * FROM jobordersscheduled LEFT OUTER JOIN joborders on jobordersscheduled.JobOrderNumber = joborders.JobOrderNumber WHERE GroupID = @GroupID">
<SelectParameters>
<asp:ControlParameter ControlID="tbgroupid" Name="GroupID" ConvertEmptyStringToNull="false" />
</SelectParameters>
</asp:SqlDataSource>
<ajaxToolkit:ModalPopupExtender ID="popupcontrollerdate" TargetControlID="datehiddenpopup" PopupControlID="datejopopup" CancelControlID="datebtn_Cancel"
runat="server" PopupDragHandleControlID="popupheader" Drag="true" BackgroundCssClass="modalpopupbg">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel ID="datejopopup" runat="server">
<asp:UpdatePanel ID="UpModal" runat="server">
<ContentTemplate>
<div class="popupbg">
<div class="popupheader" id="datepopheader">Job Order Criteria</div>
<br />
<div>The job order you chose shares the calendar of appointments for this date with the following other job orders:</div>
<br />
<asp:DetailsView ID="MultipleDetailGrid" runat="server" DataSourceID="OtherJODS" AutoGenerateRows="False" DataKeyNames="JobOrderNumber" GridLines="None" AllowPaging="true">
<PagerStyle VerticalAlign="Top" />
<PagerTemplate>
<asp:Button ID="previousjo" runat="server" Text="<- Prev" CommandName="Page" CommandArgument="Prev" class="btn btn-primary" CausesValidation="false" />
<asp:Button ID="nextjo" runat="server" Text="Next ->" CommandName="Page" CommandArgument="Next" class="btn btn-primary" CausesValidation="false" />
</PagerTemplate>
<Fields>
<asp:BoundField DataField="JobOrderNumber" HeaderText="Job Order:" />
<asp:BoundField DataField="Company" HeaderText="Company Name:" />
<asp:BoundField DataField="JobOrderPay" HeaderText="Salary Range:" />
<asp:BoundField DataField="JobOrderBenefitsPackage" HeaderText="Benefits Package:" />
<asp:BoundField DataField="MinEduReq" HeaderText="Education Required:" />
<asp:BoundField DataField="Experience" HeaderText="Experience:" />
<asp:BoundField DataField="HiringReq" HeaderText="Hiring Req:" />
<asp:BoundField DataField="LicenseReq" HeaderText="License Req:" />
<asp:BoundField DataField="JobOrderComments" HeaderText="Comments:" />
</Fields>
</asp:DetailsView>
<br />
<br />
<div>Is this the date you wish to schedule an appointment for?</div>
<br />
<asp:Button ID="datecmdOK" runat="server" Text="OK" OnClick="datecmdOK_Click" class="btn btn-primary" CausesValidation="false" />
<asp:Button ID="datebtn_Cancel" runat="server" Text="Cancel" class="btn btn-warning" CausesValidation="false" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
答案 0 :(得分:0)
使用以下代码
`
<ajaxToolkit:ModalPopupExtender ID="popupcontrollerdate" TargetControlID="datehiddenpopup" PopupControlID="UpModal" CancelControlID="datebtn_Cancel"
runat="server" PopupDragHandleControlID="popupheader" Drag="true" BackgroundCssClass="modalpopupbg">
</ajaxToolkit:ModalPopupExtender>
`
<asp:UpdatePanel ID="UpModal" runat="server">
<ContentTemplate>
<asp:Panel ID="datejopopup" runat="server">
<div class="popupbg">
<div class="popupheader" id="datepopheader">Job Order Criteria</div>
<br />
<div>The job order you chose shares the calendar of appointments for this date with the following other job orders:</div>
<br />
<asp:DetailsView ID="MultipleDetailGrid" runat="server" DataSourceID="OtherJODS" AutoGenerateRows="False" DataKeyNames="JobOrderNumber" GridLines="None" AllowPaging="true">
<PagerStyle VerticalAlign="Top" />
<PagerTemplate>
<asp:Button ID="previousjo" runat="server" Text="<- Prev" CommandName="Page" CommandArgument="Prev" class="btn btn-primary" CausesValidation="false" />
<asp:Button ID="nextjo" runat="server" Text="Next ->" CommandName="Page" CommandArgument="Next" class="btn btn-primary" CausesValidation="false" />
</PagerTemplate>
<Fields>
<asp:BoundField DataField="JobOrderNumber" HeaderText="Job Order:" />
<asp:BoundField DataField="Company" HeaderText="Company Name:" />
<asp:BoundField DataField="JobOrderPay" HeaderText="Salary Range:" />
<asp:BoundField DataField="JobOrderBenefitsPackage" HeaderText="Benefits Package:" />
<asp:BoundField DataField="MinEduReq" HeaderText="Education Required:" />
<asp:BoundField DataField="Experience" HeaderText="Experience:" />
<asp:BoundField DataField="HiringReq" HeaderText="Hiring Req:" />
<asp:BoundField DataField="LicenseReq" HeaderText="License Req:" />
<asp:BoundField DataField="JobOrderComments" HeaderText="Comments:" />
</Fields>
</asp:DetailsView>
<br />
<br />
<div>Is this the date you wish to schedule an appointment for?</div>
<br />
<asp:Button ID="datecmdOK" runat="server" Text="OK" OnClick="datecmdOK_Click" class="btn btn-primary" CausesValidation="false" />
<asp:Button ID="datebtn_Cancel" runat="server" Text="Cancel" class="btn btn-warning" CausesValidation="false" />
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
UpModal
并将datejopoup
放入updatePanel