Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
igDialog("close") not closing all igDialog windows
posted

In my application I am firing session timeout notification using igDialog("open"), as in my application we have multiple windows and pop-up's many parent child windows, and I am showing session timeout popup on all open windows, I like to close all session timeout popup's in one click. Please suggest.

Parents
No Data
Reply
  • 10685
    Offline posted

    Hello Chetan Birari, Thank you for posting in our community! 

    You can obtain all igDialog instances and destroy these at once. For example, you can add the same class="myWidget"> to all of the instances you want to destroy and call $('.myWidget').igDialog("destroy"); for example. In some cases you may want to clear the HTML content prior to destroying the widgets like calling $('.myWidget').igDialog("content", ""); 

    You can refer to the code snippets bellow:

    //Init:
    <div id="dialog" class="myWidget">
         <img style="width: 200px" src="">igniteui.com/.../img>
       </div>
    <div id="dialog1" class="myWidget">
         <img style="width: 200px" src="">igniteui.com/.../img>
       </div> 

           $(function () {
                $("#dialog").igDialog({ height: 250 });
                $("#dialog1").igDialog({ height: 250 });  

           })

    //Cleanup:
    $('.myWidget').igDialog("content", "");
    $('.myWidget').igDialog("destroy");

     

    Please let me know how my suggestions work for you!

Children