[CLOSED] Unable to show window controls

  1. #1

    [CLOSED] Unable to show window controls

    Hi,

    Why the popup window not showing added page controls in popup window?

    Base window code
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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 Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                ResourceManager1.SetTheme(Ext.Net.Theme.Neptune);
            }
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>:: Ext.Net.Examples ::</title>
        <script language="javascript" type="text/javascript">
            var OpenAccountCreation = function (idVal) {
    
                var windowConfig = {
                    id: "WinNewAccountScreen",
                    height: 520,
                    width: 800,
                    hidden: false,
                    closable: false,
                    title: "Create a New Account",
                    //closeAction: "hide",
                    buttonAlign: "center",
                    iconCls: "icon-userstar",
                    buttons: [
                        {
                            id: "btnSaveUser",
                            text: "Save and Continue",
                            iconCls: "icon-disk",
                            listeners: {
                                click: {
                                    fn: function (el, e) {
                                        parent.parent.Ext.getCmp('WinNewAccountScreen').getBody().btnSaveInfo.fireEvent('click');
                                    }
                                }
                            }
                        },
                        {
                            id: "btnUserProfileClose",
                            text: "Close",
                            listeners: {
                                click: {
                                    fn: function (el, e) {
                                        //parent.parent.Ext.getCmp('WinNewAccountScreen').getBody().btnCheckToDelete.fireEvent('click');
                                        parent.parent.Ext.getCmp('WinNewAccountScreen').close();
                                    }
                                }
                            }
                        }
                    ],
                    autoLoad: {
                        url: "ExtTestWindow.aspx?" + new Date().getTime(),
                        nocache: true,
                        mode: "iframe",
                        showMask: true,
                        triggerEvent: "show",
                        reloadOnEvent: true
                    }
                }
    
                renderWindow(windowConfig);
            }
    
            var renderWindow = function (windowConfig) {
    
                var win = Ext.getCmp(windowConfig);
                if (!win) {
                    var w = new Ext.Window(windowConfig);
                    w.show();
                } else {
                    win.close();
                    var w = new Ext.Window(windowConfig);
                    w.show();
                }
            }
    
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button ID="btnShowWindow" runat="server" Text="Show Popup">
        <Listeners>
        <Click Handler="OpenAccountCreation('1')"></Click>
        </Listeners>
        </ext:Button>
        </form>
    </body>
    </html>

    Popup Window Code

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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 Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                ResourceManager1.SetTheme(Ext.Net.Theme.Neptune);
            }
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script language="javascript" type="text/javascript">
            var ShowInfo = function () {
                alert("Clicked");
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
            <Items>
                <ext:Panel ID="pnlbackground" runat="server" Region="Center" Border="false">
                    <TopBar>
                        <ext:Toolbar ID="tbTest" runat="server">
                            <Items>
                                <ext:Button ID="btnSaveInfo" runat="server" Text="Save">
                                    <Listeners>
                                        <Click Handler="ShowInfo()">
                                        </Click>
                                    </Listeners>
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                </ext:Panel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by Daniil; Oct 15, 2013 at 6:38 AM. Reason: [CLOSED]
  2. #2
    Hello!

    You should use another configuration with loader:

    var OpenAccountCreation = function (idVal) {
    
        var windowConfig = {
            id: "WinNewAccountScreen",
            height: 520,
            width: 800,
            hidden: false,
            closable: false,
            title: "Create a New Account",
            //closeAction: "hide",
            buttonAlign: "center",
            iconCls: "icon-userstar",
            buttons: [
                {
                    id: "btnSaveUser",
                    text: "Save and Continue",
                    iconCls: "icon-disk",
                    listeners: {
                        click: {
                            fn: function (el, e) {
                                parent.parent.Ext.getCmp('WinNewAccountScreen').getBody().btnSaveInfo.fireEvent('click');
                            }
                        }
                    }
                },
                {
                    id: "btnUserProfileClose",
                    text: "Close",
                    listeners: {
                        click: {
                            fn: function (el, e) {
                                //parent.parent.Ext.getCmp('WinNewAccountScreen').getBody().btnCheckToDelete.fireEvent('click');
                                parent.parent.Ext.getCmp('WinNewAccountScreen').close();
                            }
                        }
                    }
                }
            ],
            loader: {
                loadMask: { showMask: true },
                renderer: "frame",
                url: "ExtTestWindow.aspx"
            }
        };
        renderWindow(windowConfig);
    };
  3. #3
    Hi Baidaly,

    Thank you it is working, but why toolbar added in the popup is not showing background (may be gray)? I have added the button but it is not showing as button on the toolbar.
  4. #4
    It supposed to be white because you use Neptune theme.
  5. #5
    Hi Baidaly,

    Ok Thank you, Can we add background color like normal toolbar? When I test in IE7.0 I am getting the message like "False" is undefind and while debug I am getting error at "Ext.net.ResourceMgr.setTheme("/AtlosAppV2/extjs/resources/ext_theme_neptune/ext-theme-neptune-all-embedded-css/ext.axd?v=27231", "neptune", False, False)"
  6. #6
    You can add the following CSS rule to your page:

    .x-toolbar {
        background-color: #808080;
    }
    About this error, I don't understand where do you get it? Do you do something or just opening the window?

Similar Threads

  1. Replies: 0
    Last Post: Jul 31, 2012, 9:36 AM
  2. [CLOSED] Button event is not firing in parent window from popup window
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 14, 2011, 7:35 PM
  3. Replies: 1
    Last Post: Mar 14, 2011, 4:20 PM
  4. Replies: 1
    Last Post: Mar 11, 2011, 10:07 PM
  5. [CLOSED] Popup window Collabse issue
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 23, 2010, 6:34 PM

Tags for this Thread

Posting Permissions