Current filter:
                                You should refresh the page.
                                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

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.