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

ControlResolveEventArgs.ResolvedControl Property

Gets or sets the control relating to the event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public Control ResolvedControl { get; set; }

Property Value

Type Description
Control

A Control object representing the required control.

Remarks

In the corresponding event’s handler, you manually find a control that should be resolved (its ID is passed via the ControlResolveEventArgs.ControlID property), and assign it to the ResolvedControl property.

Examples

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;
     }
</script>
...
<dxm:ASPxPopupMenu ID="ASPxPopupMenu1" runat="server" 
OnPopupElementResolve="ASPxPopupMenu1_PopupElementResolve"
             PopupElementID="ASPxButton1">
             <Items>
                 <dxm:MenuItem Text="Red Item">
                     <TextTemplate>
                         <span style="color:Red;">Red Item</span>
                     </TextTemplate>
                 </dxm:MenuItem>
                 <dxm:MenuItem Text="Yellow Item">
                     <TextTemplate>
                         <span style="color:Yellow;">Yellow Item</span>
                     </TextTemplate>                
                 </dxm:MenuItem>
                 <dxm:MenuItem Text="Green Item">
                     <TextTemplate>
                         <span style="color:Green;">Green Item</span>
                     </TextTemplate>                
                 </dxm:MenuItem>
             </Items>
             <ClientSideEvents ItemClick="function(s,e) 
              {alert('The item with index = ' + e.item.index.toString() + ' was clicked');}"/>
         </dxm:ASPxPopupMenu>
...
See Also