Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / How to keep webdialog as modal after asynchronous postback

How to keep webdialog as modal after asynchronous postback

New Discussion
Ahmet
Ahmet asked on Dec 11, 2008 12:33 PM

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…

 

Sign In to post a reply

Replies

  • 0
    [Infragistics] Rumen Stankov
    [Infragistics] Rumen Stankov answered on Sep 1, 2008 3:30 PM

    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>

    • 0
      Jim
      Jim answered on Sep 11, 2008 7:25 PM

      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. 

    • 0
      Levon
      Levon answered on Sep 17, 2008 3:27 PM

       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"&gt;
      <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;
          }

       

  • 0
    Herman
    Herman answered on Oct 6, 2008 8:57 PM

    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.

     

    • 0
      Jim
      Jim answered on Oct 7, 2008 2:13 PM

      I decided to switch to the ModalPopupExtender that is part of the AJAX.net toolkit. It is working perfectly with async postbacks and is VERY easy to setup. The only downside is that you are responsible for the look and feel of the dialog (no themes to pick from etc). Another plus is that it is much easier to find help and examples on this control because the community is much more active with alot of posts on it.

      • 0
        [Infragistics] Viktor Snezhko
        [Infragistics] Viktor Snezhko answered on Oct 7, 2008 9:03 PM

        Hi,

        Persistance of modal state was fixed awhile ago. I think that it should be available in hot fixes. If latest hot fixes do not have that, then it should be next fix for sure.

      • 0
        Tom
        Tom answered on Dec 9, 2008 5:06 AM

        Is there a hotfix for this issue? if so, can we have a download link here please?

      • 0
        [Infragistics] Viktor Snezhko
        [Infragistics] Viktor Snezhko answered on Dec 9, 2008 2:19 PM

        To get a hot-fix you can go to Products->ASP.NET->Downloads->My Keys and Downloads

        https://www.infragistics.com/my-account/keys-and-downloads

  • 0
    Duberry
    Duberry answered on Dec 11, 2008 12:33 PM

    I had the same issue and found that the following link served as an excellent workaround.

     

    https://www.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/48219/how-to-iterate-all-timeslot-in-timelineview#48219

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Ahmet
Favorites
0
Replies
9
Created On
Dec 11, 2008
Last Post
17 years, 3 months ago

Suggested Discussions

Created by

Created on

Dec 11, 2008 12:33 PM

Last activity on

Feb 24, 2026 7:41 AM