locked
Prevent modal window closing parent RRS feed

  • Question

  • I have two child windows that opens Parent > Child > Child. I would like to close these windows in the order they were opened. The modal dialog X works, but I would like to place a Save and Close buttons. The default close buttons created, closes all windows.  How can I close Child > Child > Parent.




    • Edited by gnetsys Thursday, September 10, 2015 4:24 PM
    Thursday, September 10, 2015 1:46 AM

Answers

  • Hi gnetsys,

     

    Based on your description, do the two child windows are both modal dialog? And how do you place a Save and Close buttons? I create a custom modal dialog with this blog. In this blog, it just create one modal dialog. I modify it with add a button named "AddAnotherModalDialog" which used to pop up the second modal dialog. And on the second modal dialog, I just put one button which used to close current dialog.

    Then double click the "Cancle" or "Second Close" button on design screen and add the close code in the button's _Execute method as below. Please notice the parameter in the CloseModalWindow method, it is the name of the modal window which need to be close.

            partial void EditDialogCancle_Execute()
            {
                // Write your code here.
                this.CloseModalWindow("CustomEditDialog");
            }
            partial void SecondClose_Execute()
            {
                // Write your code here.
                this.CloseModalWindow("Group");
            }

     



    Best Regards,
    Weiwei

    • Proposed as answer by Angie Xu Monday, September 21, 2015 1:38 AM
    • Marked as answer by Angie Xu Thursday, September 24, 2015 6:35 AM
    Monday, September 14, 2015 6:44 AM
    Moderator