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

ASPxPopupControl.PopupAction Property

Gets or sets a value that specifies which action forces a popup window to appear.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(PopupAction.LeftMouseClick)]
public PopupAction PopupAction { get; set; }

Property Value

Type Default Description
PopupAction **LeftMouseClick**

One of the PopupAction enumeration values.

Available values:

Name Description
None

Specifies that a popup element can’t be invoked via an end-user interaction, but can be invoked programmatically via specific client script methods.

LeftMouseClick

Specifies that a popup element is invoked at a left mouse button click within the corresponding linked web control or HTML element.

RightMouseClick

Specifies that a popup element is invoked on a right mouse button click within the corresponding linked web control or HTML element.

MouseOver

Specifies that a popup element is invoked when the mouse cursor hovers over the corresponding linked web control or HTML element.

Remarks

A popup window may be invoked by a specific mouse action (such as a left mouse click, right mouse click or hovering) which is performed on a particular element (a web control or any HTML element) specified by the popup control’s ASPxPopupControl.PopupElementID property (or the PopupWindow.PopupElementID property of the popup window). Use the PopupAction property to specify the precise client action which will invoke the current popup window.

Example

This example demonstrates how to use the ASPxPopupControl control. The complete sample project is available in the DevExpress Code Central database at E1120.

<script runat="server">
     protected void Page_Load(object sender, EventArgs e)
     {
         if (!IsPostBack) CustomizePopupControlAppearance();
     }

     void CustomizePopupControlAppearance() { 
         ASPxPopupControl1.Modal = true;

         //Make the ASPxPopupControl's elements invisible
         ASPxPopupControl1.BackColor = System.Drawing.Color.Transparent;
         ASPxPopupControl1.Border.BorderWidth = 0;
         ASPxPopupControl1.ContentStyle.Paddings.Padding = 0;
         ASPxPopupControl1.ShowHeader = false;
         ASPxPopupControl1.ShowSizeGrip = DevExpress.Web.ShowSizeGrip.False;
         ASPxPopupControl1.ShowShadow = false;

         //Specify that the ASPxPopupControl can only be invoked and closed programmatically
         ASPxPopupControl1.PopupAction = DevExpress.Web.PopupAction.None;
         ASPxPopupControl1.CloseAction = DevExpress.Web.CloseAction.None;

         //Make the ASPxPopupControl displayed centered within the ASPxGridView
         ASPxPopupControl1.PopupElementID = "ASPxGridView1";
         ASPxPopupControl1.PopupHorizontalAlign = 
             DevExpress.Web.PopupHorizontalAlign.Center;
         ASPxPopupControl1.PopupVerticalAlign = 
              DevExpress.Web.PopupVerticalAlign.Middle;
     }

     protected void btnReloadDemo_Click(object sender, EventArgs e){
         //Reset the grid's data source
         Session["GridDataSource"] = null;

         Response.Redirect("Default.aspx");
     }
</script>
...
 <dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server" 
      ClientInstanceName="popupControl" >
     <ClientSideEvents Init="popupControl_Init" />
     <ContentCollection>
         <dxpc:PopupControlContentControl runat="server">
             <uc1:WebUserControl ID="WebUserControl1" runat="server" />
         </dxpc:PopupControlContentControl>
     </ContentCollection>
 </dxpc:ASPxPopupControl> 
...
See Also