ASPxPopupControl.PopupElementResolve Event
Allows an object specified by the ASPxPopupControl.PopupElementID property to be found manually, if it can’t be found automatically ( for instance, if it’s hidden within a naming container).
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Event Data
The PopupElementResolve event's data class is ControlResolveEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
ControlID | Gets the ID value of a control that should be resolved. |
ResolvedControl | Gets or sets the control relating to the event. |
Remarks
The PopupElementResolve event occurs when the hierarchically-qualified identifier of a control specified by the ASPxPopupControl.PopupElementID property is queried during popup control rendering.
If the specified object cannot be found within a web page in a standard manner (for instance, it is contained within a naming container such as an ASPxRoundPanel, or there is more than one object with the same ID on the page - within UserControl objects), you should handle the PopupElementResolve event to obtain the required object manually.
The PopupElementResolve event argument’s parameters allow you to identify the control that should be found (the ControlResolveEventArgs.ControlID property) and point out the resolved control (the ControlResolveEventArgs.ResolvedControl property).
Example
This example demostrates how the ASPxPopupControl.PopupElementResolve
event can be handled to resolve an ASPxTextBox object contained within an ASPxRoundPanel control.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dxrp" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dxp" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void ASPxPopupControl1_PopupElementResolve(object sender,
DevExpress.Web.ControlResolveEventArgs e) {
e.ResolvedControl = ASPxRoundPanel1.FindControl(e.ControlID);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="200px">
<PanelCollection>
<dxp:PanelContent runat="server">
<dxe:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px">
</dxe:ASPxTextBox>
</dxp:PanelContent>
</PanelCollection>
</dxrp:ASPxRoundPanel>
<dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server" PopupAction="MouseOver"
PopupElementID="ASPxTextBox1"
OnPopupElementResolve="ASPxPopupControl1_PopupElementResolve">
<ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
Some Text
</dxpc:PopupControlContentControl>
</ContentCollection>
</dxpc:ASPxPopupControl>
</form>
</body>
</html>