Skip to main content
A newer version of this page is available. .
Tab

ASPxPopupControl.Modal Property

Gets or sets whether the default popup window is modal.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(false)]
public bool Modal { get; set; }

Property Value

Type Default Description
Boolean **false**

true if the default popup window is modal; otherwise, false.

Remarks

A modal popup window retains input focus while open. The user cannot switch windows until the popup window is closed.

Note

When enabling the modal mode, make sure that the ASPxPopupControl.CloseAction property is set properly. It’s necessary to set the ASPxPopupControl.CloseAction property to the CloseAction.CloseButton value, to prevent the popup window from being closed by an outer mouse click (which is a closing action set by default).

Example

This example demonstrates how nested popup windows can be displayed using the ASPxPopupControl.

function KeyHandler(e) {
        if (e.keyCode == 27)
            if (window2.IsVisible())
                window2.Hide();
            else if (window1.IsVisible())
                window1.Hide();
            else
                return false;
        return true;
}
See Also