Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi,

                                    Is it possible to nest two popupcontrols and still use the PopupElementID property for the second (inner) popcontrol?

                                    I have the following sample:

                                            <dxe:ASPxButton ID="ASPxButton1" runat="server" Text="ASPxButton" AutoPostBack="False">
                                            </dxe:ASPxButton>
                                            <dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server" HeaderText="Window 1"
                                                PopupElementID="ASPxButton1" PopupHorizontalAlign="LeftSides" PopupVerticalAlign="Below">
                                                <ContentCollection>
                                                    <dxpc:PopupControlContentControl runat="server">
                                                        <dxe:ASPxButton ID="ASPxButton2" runat="server" Text="ASPxButton" AutoPostBack="False">
                                                        </dxe:ASPxButton>
                                                    </dxpc:PopupControlContentControl>
                                                </ContentCollection>
                                            </dxpc:ASPxPopupControl>
                                            <dxpc:ASPxPopupControl ID="ASPxPopupControl2" runat="server" HeaderText="Window 2"
                                                PopupElementID="ASPxButton2" PopupHorizontalAlign="LeftSides" PopupVerticalAlign="Below">
                                                <ContentCollection>
                                                    <dxpc:PopupControlContentControl runat="server">
                                                        Hello
                                                    </dxpc:PopupControlContentControl>
                                                </ContentCollection>
                                            </dxpc:ASPxPopupControl>

                                    the PopupElementID for the second popupcontrol is set to 'ASPxButton2', which is part of the first popupcontrol. I know you can show the second popup using client side events, but how can I make sure the second popup is show exactly below ASPxButton2?

                                0

                                Hello Andy,

                                It seems that you can handle the PopupElementResolve event for this purpose. Note that I've also modified the CloseAction property's value of the ASPxPopupControl1:

                                        <dxe:ASPxButton ID="ASPxButton1" runat="server" Text="ASPxButton" AutoPostBack="False">
                                        </dxe:ASPxButton>
                                        <dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server" HeaderText="Window 1"
                                            PopupElementID="ASPxButton1" PopupHorizontalAlign="LeftSides" PopupVerticalAlign="Below" CloseAction="CloseButton">
                                            <ContentCollection>
                                                <dxpc:PopupControlContentControl runat="server">
                                                    <dxe:ASPxButton ID="ASPxButton2" runat="server" Text="ASPxButton" AutoPostBack="False">
                                                    </dxe:ASPxButton>
                                                </dxpc:PopupControlContentControl>
                                            </ContentCollection>
                                        </dxpc:ASPxPopupControl>
                                        <dxpc:ASPxPopupControl ID="ASPxPopupControl2" runat="server" HeaderText="Window 2"
                                            PopupElementID="ASPxButton2" PopupHorizontalAlign="LeftSides" PopupVerticalAlign="Below" OnPopupElementResolve="ASPxPopupControl2_PopupElementResolve">
                                            <ContentCollection>
                                                <dxpc:PopupControlContentControl ID="PopupControlContentControl2" runat="server">
                                                    Hello
                                                </dxpc:PopupControlContentControl>
                                            </ContentCollection>
                                        </dxpc:ASPxPopupControl>

                                    protected void ASPxPopupControl2_PopupElementResolve(object sender, DevExpress.Web.ASPxClasses.ControlResolveEventArgs e) {
                                        if (e.ControlID == "ASPxButton2") {
                                            e.ResolvedControl = ASPxPopupControl1.FindControl(e.ControlID);
                                        }
                                    }

                                Thanks,
                                Andrew

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners