Hi,
I use webdialog as a wizard. The wizard requires heavily server-side operation. Therefore, i need to do asynchronous postback. However, if i do so, the modality of the webdialog is lost. The background shadow disappears, the webdialog comes back its initial position and the modality behavior is lost. Here is my setup roughly:
<UpdatePanel>
<WebDialogWindow>
<ContentPane>
<Template>
<asp:Button ID="Button1" OnClick="Button1_Click">
</Template>
</ContentPane>
</WebDialogWindow>
</UpdatePanel>
When I click Button1, the server side operation is done but the modality of the webdialog is lost. How can i handle this problem?
Thanks in advance...
I am trying to do the same thing, using the WebDialog for wizard. Looking at the complexity of this, is Telerik RadWindow a better fit for this initiative?
Any suggestion is appreciated.
It looks like css class that was assigned to ModalBackgroundCssClass property is not applied after asynch postback.
WebDialogWindow is inside an UpdatePanel.
After a asynchronous postback, the dialog window shows up but the ModalBackgroundCssClass css is not applied.
Is WebDialogWindow not compatible with UpdatePanel?
Here is my code
FrontEnd:
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <asp:UpdatePanel ID="upanel" runat="server" ChildrenAsTriggers="true"> <ContentTemplate> <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="300px" Width="400px" Modal="true" Moveable="true"> <ContentPane> <Template> <asp:Button ID="btnOK" runat="server" Text="okay" OnClick="btnOK_Click" /> </Template> </ContentPane> </ig:WebDialogWindow> <asp:Button ID="btnShow" runat="server" Text="show window" OnClick="btnShow_Click" /> </ContentTemplate> </asp:UpdatePanel> </div> </form></body></html>
Code Behind:
protected void Page_Load(object sender, EventArgs e) { } protected void btnShow_Click(object sender, EventArgs e) { this.WebDialogWindow1.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal; } protected void btnOK_Click(object sender, EventArgs e) { this.WebDialogWindow1.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Hidden; }
This solution does not fix the problem. The problem is not getting the dialog to show again, it is that it is not modal when it does show again. Any type of async postback on the dialog seems to cause this behavior. Example:
Put a grid on the dialog with paging. The grid will page async like it should, but after the first page the dialog is no longer modal. If you close the dialog and reopen it, the dialog is not modal.
The lack of support for async postbacks on the dialog severly cripples its usefulness. Outside of popping up informational messages, I seem to always encounter this bug.
Hello,
This one could be very tricky. You will need to subscribe to the EndRequest client-side event of the built-in ASP.NET RequestManager and in the javascript event handler show the Modal Window again using javascript (and the WebDialogWindow Client Side Object Model (CSOM).
Example:
<script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(EndRequest); function EndRequest (sender, args)
{ $find("<%= WebDialogWindow1.ClientID %>").show()
} </script>