G
gsauns
I have a DetailsView inside a ModalPopup (using the AJAX
ModalPopupExtender).
I would like the user to have the ability to change the DetailsView's
mode within the ModalPopup.
But whenever I click the button to change the mode, the ModalPopup
closes itself. The NEXT time I open the ModalPopup, the mode has been
changed. So the mode is changing... my problem is that I need the
ModalPopup to stay visible.
Also, the DetailsView is inside an UpdatePanel within the Panel I am
popping up. The ModalPopupExtender's OKControlID and CancelControlID
are not within this UpdatePanel (but are inside the Panel).
I have downloaded an example that suggests that what I am trying to do
should work... am I misunderstanding something?
Code:
Target control:
<asp:LinkButton ID="lbtn" runat="server" Text="Modal"></
asp:LinkButton>
<cc1:ModalPopupExtender ID="modal" runat="server"
TargetControlID="lbtn" PopupControlID="pnl" DropShadow="true"
Drag="true" CancelControlID="btnCancel" OkControlID="btnOk"
BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
Panel:
<aspanel ID="pnl" runat="server" Height="400px" Width="900px"
BackColor="Khaki">
<asp:UpdatePanel ID="UpdatePanel9" runat="server">
<ContentTemplate>
<aspetailsView ID="dv" runat="server" Width="100%" DataKeyNames="ID"
DataSourceID="ds" DefaultMode="ReadOnly" AutoGenerateRows="false">
<Fields>
....
</Fields>
<FooterTemplate>
// Buttons that change the mode
</FooterTemplate>
</aspetailsView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="btnOk" runat="server" Text="OK" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" />
</aspanel>
<
ModalPopupExtender).
I would like the user to have the ability to change the DetailsView's
mode within the ModalPopup.
But whenever I click the button to change the mode, the ModalPopup
closes itself. The NEXT time I open the ModalPopup, the mode has been
changed. So the mode is changing... my problem is that I need the
ModalPopup to stay visible.
Also, the DetailsView is inside an UpdatePanel within the Panel I am
popping up. The ModalPopupExtender's OKControlID and CancelControlID
are not within this UpdatePanel (but are inside the Panel).
I have downloaded an example that suggests that what I am trying to do
should work... am I misunderstanding something?
Code:
Target control:
<asp:LinkButton ID="lbtn" runat="server" Text="Modal"></
asp:LinkButton>
<cc1:ModalPopupExtender ID="modal" runat="server"
TargetControlID="lbtn" PopupControlID="pnl" DropShadow="true"
Drag="true" CancelControlID="btnCancel" OkControlID="btnOk"
BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
Panel:
<aspanel ID="pnl" runat="server" Height="400px" Width="900px"
BackColor="Khaki">
<asp:UpdatePanel ID="UpdatePanel9" runat="server">
<ContentTemplate>
<aspetailsView ID="dv" runat="server" Width="100%" DataKeyNames="ID"
DataSourceID="ds" DefaultMode="ReadOnly" AutoGenerateRows="false">
<Fields>
....
</Fields>
<FooterTemplate>
// Buttons that change the mode
</FooterTemplate>
</aspetailsView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="btnOk" runat="server" Text="OK" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" />
</aspanel>
<