A newer version of this page is available. Switch to the current version.

ASPxPopupMenu.PopupElementID Property

Gets or sets the ID (or a list of IDs) of a web control or HTML element with which the current popup menu is associated.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll


public string PopupElementID { get; set; }
Public Property PopupElementID As String

Property Value

Type Default Description


A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup menu is associated.


Use the PopupElementID property to specify the web control or HTML element whose specific mouse action defined via the ASPxPopupMenu.PopupAction property invokes the current popup menu control. You can also specify a list of control IDs separated by the semicolon (;) sign.


To specify this value on the client side, use the ASPxClientPopupMenu.SetPopupElementID method.


The PopupElementID property should be set to a control's ASPxWebControlBase.ClientID property when the menu and control are placed in different containers.

<dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="100%">
          <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
               <dx:ASPxTreeList ID="MyTreeList" runat="server" Width="100%" AutoGenerateColumns="False">
<dx:ASPxPopupMenu ID="popupMenu" runat="server" AutoPostBack="true" OnLoad="popupMenu_Load">


The complete sample project is available in the DevExpress Code Central database at E557.

<script runat="server">
     protected void Page_Load(object sender, EventArgs e) {   
     protected void ASPxPopupMenu1_PopupElementResolve(object sender, 
        ControlResolveEventArgs e) {
         e.ResolvedControl = ASPxButton1;
<dxm:ASPxPopupMenu ID="ASPxPopupMenu1" runat="server" 
                 <dxm:MenuItem Text="Red Item">
                         <span style="color:Red;">Red Item</span>
                 <dxm:MenuItem Text="Yellow Item">
                         <span style="color:Yellow;">Yellow Item</span>
                 <dxm:MenuItem Text="Green Item">
                         <span style="color:Green;">Green Item</span>
             <ClientSideEvents ItemClick="function(s,e) 
              {alert('The item with index = ' + e.item.index.toString() + ' was clicked');}"/>
See Also