Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi,
                                    I'm try to build a popup at run-time like this example: http://demos.devexpress.com/ASPxGridViewDemos/Templates/Template.aspx.
                                    My code is:

                                        /// <summary>
                                        /// Rappresenta un Popup base
                                        /// </summary>
                                        public class BasePopup : ASPxPopupControl
                                        {
                                            /// <summary>
                                            /// Costruttore del popup
                                            /// </summary>
                                            public BasePopup() : base()
                                            {
                                                CssFilePath = "~/App_Themes/Office2010Black/{0}/styles.css";
                                                CssPostfix = "Office2010Black";
                                            }

                                            /**
                                             * <ContentCollection>
                                                    <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
                                                        <dx:ASPxCallbackPanel ID="callbackPanel" ClientInstanceName="callbackPanel" runat="server"
                                                            Width="100%" Height="100%" OnCallback="callbackPanel_Callback" RenderMode="Table">
                                                            <PanelCollection>
                                                                <dx:PanelContent ID="PopupContent" runat="server">

                                                                </dx:PanelContent>
                                                            </PanelCollection>
                                                        </dx:ASPxCallbackPanel>
                                                    </dx:PopupControlContentControl>
                                                </ContentCollection>
                                                <ClientSideEvents Shown="popup_Shown" />

                                             */
                                            /// <summary>
                                            /// </summary>
                                            protected override void OnInit(EventArgs e)
                                            {
                                                base.OnInit(e);
                                                ID = _conf + "_ASPxPopupControl";
                                                ClientInstanceName = _conf + "_ASPxPopupControl";
                                                AutoUpdatePosition = true;
                                                PopupHorizontalAlign = DevExpress.Web.ASPxClasses.PopupHorizontalAlign.WindowCenter;
                                                PopupVerticalAlign = DevExpress.Web.ASPxClasses.PopupVerticalAlign.WindowCenter;
                                                
                                                //<ContentCollection>
                                                PopupControlContentControlCollection coll = new PopupControlContentControlCollection(this);
                                                
                                                
                                                //<dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
                                                PopupControlContentControl popupControlContentControl = new PopupControlContentControl();
                                                coll.Add(popupControlContentControl);
                                                
                                               
                                                CloseAction = DevExpress.Web.ASPxClasses.CloseAction.CloseButton;
                                                
                                                //<dx:ASPxCallbackPanel ID="callbackPanel" ClientInstanceName="callbackPanel" runat="server" Width="100%" Height="100%" OnCallback="callbackPanel_Callback" RenderMode="Table">
                                                ASPxCallbackPanel aSPxCallbackPanel = new ASPxCallbackPanel();
                                                aSPxCallbackPanel.ClientInstanceName = _conf + "_ASPxCallbackPanel";
                                                aSPxCallbackPanel.ID = aSPxCallbackPanel.ClientInstanceName;
                                                aSPxCallbackPanel.RenderMode = RenderMode.Div;
                                                aSPxCallbackPanel.Callback += Callback;
                                                aSPxCallbackPanel.ClientSideEvents.EndCallback = "function(s, e) {" + _conf + "_ASPxPopupControl.UpdatePosition()}";

                                                popupControlContentControl.Controls.Add(aSPxCallbackPanel);
                                                
                                                //<PanelCollection>
                                                PanelCollection panelCollection = new PanelCollection(aSPxCallbackPanel);

                                                popupControlContentControl.ID = _conf + "PopupControlContentControl";
                                                // <dx:PanelContent ID="PopupContent" runat="server">
                                                PanelContent panelContent = new PanelContent();
                                                panelContent.ID = _conf + "_PopupContent";
                                                panelCollection.Add(panelContent);
                                                //aSPxCallbackPanel.Controls.Clear();
                                                HtmlGenericControl ctrlDiv = new HtmlGenericControl("div");
                                                ctrlDiv.ID = _conf + "_divContent";
                                                ctrlDiv.Controls.Add(_content);
                                                panelContent.Controls.Add(ctrlDiv);
                                               
                                                ClientSideEvents.Shown = "function(s, e) {" + _conf + "_ASPxCallbackPanel.PerformCallback(keyValue);}";
                                                SetPopupConf();

                                                
                                            }

                                            /// <summary>
                                            /// </summary>
                                            public void SetPopupConf()
                                            {
                                                   string header = _propertiesService.getProperty("popup." + _conf + ".title");
                                                   HeaderText = Utils.Message.GetMessage(header);
                                                AllowDragging = true;
                                            }

                                            /// <summary>
                                            /// CallBack all'apertura del popup: si occupa di caricare il form di dettaglio
                                            /// </summary>
                                            /// <param name="source"></param>
                                            /// <param name="e"></param>
                                            public virtual void Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
                                            {
                                                if (!String.IsNullOrEmpty(e.Parameter))
                                                {
                                                    ((IPopupContent)content).LoadContent(e.Parameter);
                                                }
                                            }
                                        }

                                    but when I try to Show the popup I see this error:
                                    Microsoft JScript runtime error: 'viewDSCDetails_ASPxCallbackPanel' (the CallbackPanel _conf + "_ASPxCallbackPanel";) is undefined.
                                    I don't understand the problem, is the callbackpanel added correctly?

                                0

                                Hello Maurizio,

                                Thank you for contacting us.

                                I have investigated your sample code and tried to create a sample project, but failed. It requires additional classes. I am afraid we need additional information to research the issue.
                                Could you provide us with a runnable example to help us continue investigation?

                                Best regards,
                                Vladimir

                                0

                                Hi, we bought the license yesterday.
                                At the moment I cannot send you a runnable example, my project has a lot of dynamic configurations and we use only code-behind to build all dx obejcts.
                                Problems are two:

                                1. RAM memory of browser (IE8, Chrome, FF) increases every time I open a popup control (my page has 9 popupcontrols) every popup control contains a lot of ASPxEdit object, aspxcallbackpanel, .... The memory increase, increase, increase...When I close a popup I'd like to see ram memory to decrease. But It is not happened.

                                2. Can you provide me an example of an aspxpopupcontrol with aspxcallbackpanel builded at runtime? This is the code that I want to build at run-time:

                                            <ContentCollection>
                                                <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
                                                    <dx:ASPxCallbackPanel ID="callbackPanel" ClientInstanceName="callbackPanel" runat="server"
                                                        Width="100%" Height="100%" OnCallback="callbackPanel_Callback" RenderMode="Table">
                                                        <PanelCollection>
                                                            <dx:PanelContent ID="PopupContent" runat="server">

                                                            </dx:PanelContent>
                                                        </PanelCollection>
                                                    </dx:ASPxCallbackPanel>
                                                </dx:PopupControlContentControl>
                                            </ContentCollection>
                                Is correct to insert the ASPxCallbackPanel in the PopupControlContentControl?

                                Sorry, but we need a lot of time to write a runnable example.

                                Thanks.

                                0

                                Hi,
                                this week we'll develop a runnable example.

                                thanks.

                                0

                                Hello Maurizio,

                                Thank you for choosing our product.

                                Please note that posting multiple questions within a report makes it difficult to correctly track and process such items. To process your reports more efficiently, may we ask you to open a new issue for each question, suggestion or a bug report you want to post. Thank you for your cooperation.
                                For now, I have created a separate thread on your behalf myself to process the report about the memory issue: ASPxCallbackPanel - Browser does not free the RAM memory after closing a highly customized popup control.

                                Also, I should note that from v2010 vol 2 ASPxPopupControl implements the ASPxCallbackPanel's functionality. You do not need to place ASPxCallbackPanel inside ASPxPopupControl to update inner controls. You can use the ASPxClientPopupControl.PerformCallback client method and the ASPxPopupControl.WindowCallback server event to manipulate inner controls in the same manner as if you are using ASPxCallbackPanel.

                                In addition, I suggest you examine the How to show an ASPxPopupControl with the ASPxDataView with details via the ASPxButton in the ASPxGridView's DataRowTemplate example, where ASPxPopupControl contains ASPxCallbackPAnel inside. By the way, the example uses an old build of our controls. As I said above, now you do not need to use ASPxCallbackPanel inside ASPxPopupControl.

                                If you have any other questions, you are welcome to contact us at any time.

                                Best regards,
                                Vladimir

                                To start a chat you should create a support ticket


                                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