[CLOSED] Restricion in nesting Ext.Net.Controls?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Restricion in nesting Ext.Net.Controls?

    Hi,

    Are there some common restriction of nesting Ext.Net controls in v1.3 ?

    I wonder if there is any place to read about it because for now I make my GUI like blind person and can't deduce how to make this nesting to make sure that will be working :(

    For now I have realy complicated layout and each time when I need to add simple panel to my application my heart start beat faster because it's can make crush of entire application.
    Last edited by Daniil; Jul 20, 2012 at 1:43 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Are there some common restriction of nesting Ext.Net controls in v1.3 ?
    Generally, no. You can use as many nested containers/layout as you wish.

    If you are facing some concrete issue, please provide more details.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,



    Generally, no. You can use as many nested containers/layout as you wish.

    If you are facing some concrete issue, please provide more details.
    I think I will provide some concrete tommorrow;)
  4. #4
    Daniil I've send you an email with my problem let me know if you get it:)
  5. #5
    Thank you, but our policy is do not consider the unsolicited emails from the forums, please see #7 C):
    http://forums.ext.net/showthread.php?3440

    Please post sample files here simplifying as much as you can.

    Please note you can place the code behind directly on ASPX wrapping in:
    <script runat="server">
        ...
    </script>
    Please see Example (Very Helpful) following the link I have posted.
  6. #6
    Ok I doesn't know ;)

    my page.master file:
    <%@ Master Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server" id="idPageHeader">
        <asp:ContentPlaceHolder runat="server" ID="contentHeader" />
    </head>
    <body>
        <form id="aspnetForm" runat="server">
        <ext:ResourceManager ID="ResourceManagerMain" runat="server" EnableViewState="false"
            Theme="Default" />
        <!--  IDMode="Explicit" InitScriptMode="Linked" RemoveViewState="true" -->
        <ext:Viewport ID="ViewportMainExt" runat="server" Layout="border" MinWidth="980">
            <Items>
                <ext:Panel ID="PanelMenu" runat="server" Title="Menu" Region="North" Height="70"
                    Split="false" Collapsible="false" Header="false" AutoDoLayout="true" Layout="VBoxLayout">
                    <LayoutConfig>
                        <ext:VBoxLayoutConfig Align="Stretch" />
                    </LayoutConfig>
                    <Items>
                        <ext:Panel ID="PanelNorth" runat="server" Title="Menu" Height="40" Visible="true"
                            Border="false" Split="false" Collapsible="false" Header="false">
                            <Items>
                                <ext:Toolbar ID="toolbarLogo" runat="server" Height="40" Cls="title_toolbar">
                                    <Content>
                                        <ext:Label ID="labelLogo" runat="server" Text="Title" Cls="mme_title_label" />
                                    </Content>
                                </ext:Toolbar>
                            </Items>
                        </ext:Panel>
                        <ext:Toolbar ID="MenuMain" runat="server" Height="30">
                            <Items>
                                <ext:Button ID="MenuStart" runat="server" Text="Start" OnClientClick="window.location.href='Start.aspx'"
                                    Icon="ColorWheel" />
                                <ext:ToolbarSeparator ID="SeparatorStart" runat="server" />
                                
                                <ext:Button ID="lbtnLogout" runat="server" Text="Logout" Icon="DoorIn">
                                    <DirectEvents>
                                        <click onevent="lbtnLogout_Click" />
                                    </DirectEvents>
                                </ext:Button>
                                <ext:ToolbarSeparator ID="SeparatorUserName" runat="server" />
                                <ext:Button ID="lbtnUserName" runat="server" Text="User" Icon="User" ToolTip="User profile">
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="PanelMain" runat="server" Region="Center" Split="false" AutoScroll="true"
                    Collapsible="false" AutoDoLayout="true" Shadow="Frame">
                    <Content>
                        <asp:ContentPlaceHolder ID="siteContent" runat="server" />
                    </Content>
                    <LoadMask ShowMask="true" Msg="please wait..." />
                </ext:Panel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Details.aspx:
    <%@ Page Title="" Language="C#" MasterPageFile="~/Page.Master" %>
    
    <script runat="server">
        private UserControl ser;
            protected void Page_PreInit(object sender, EventArgs e)
            {
            }
    
            protected void Page_Init(object sender,EventArgs e)
            {
                    ser = (UserControl)LoadControl("~/controls/Details/Device.ascx");
    
                    ser.ID = "device_detail";
                    
                    ContentPlaceHolder cph = (ContentPlaceHolder)this.Master.FindControl("siteContent");
                    cph.Controls.Add(ser);              
            }
    
            protected void Page_Load(object sender, EventArgs e)
            {
                
            }
    </script>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    <asp:Content ID="contentContainer" ContentPlaceHolderID="siteContent" runat="server">
    </asp:Content>
    Device.ascx:
    <%@ Control Language="C#"%>
    
    <script runat="server">
            protected void Page_Init(object sender, EventArgs e)
            {
                
                HtmlGenericControl div = new HtmlGenericControl("DIV");
                Ext.Net.Button btnNotification = new Ext.Net.Button();
                btnNotification.Text = "zgłoszenie";
                div.Attributes.CssStyle.Add("class", "specialButtonsContainer1");
                div.Controls.Add(btnNotification);
                this.Controls.Add(div);
                Ext.Net.BorderLayout borderLayout = new Ext.Net.BorderLayout();
                Ext.Net.Panel panel = new Ext.Net.Panel();
                System.Web.UI.WebControls.Button btn = new System.Web.UI.WebControls.Button();
                btn.ID = "test";
                btn.CssClass = "button";
                panel.Controls.Add(btn);
                borderLayout.North.Items.Add(panel);
                Ext.Net.Panel panelCenter = new Ext.Net.Panel();
                MultiView mView = new MultiView();
                View vView = new View();
                View vEdit = new View();
                mView.Controls.Add(vView);
                mView.Controls.Add(vEdit);
                panelCenter.Controls.Add(mView);
                borderLayout.Center.Items.Add(panelCenter);
                UserControl user = new UserControl();
                user.Controls.Add(borderLayout);
                this.Controls.Add(user);
                
            }
    
            protected void Page_Load(object sender, EventArgs e)
            {
    
            }
    </script>
    
    <%@ Register TagPrefix="ext" Namespace="Ext.Net" Assembly="Ext.Net, Version=1.3.0.2809, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87" %>
    
    <ext:Panel runat="server" Height="31">
        <Items>
        <ext:Button runat="server" ID="btnAddNotification"  IconAlign="Left" Text="add notification" Icon="ErrorAdd" Cls="topButton" />
            <ext:Button runat="server" ID="btnAddServiceOrder" IconAlign="Left" Text="add service" Icon="NoteAdd" Cls="topButton" />
            <ext:Button runat="server" ID="btnCopyDevice" IconAlign="Left" Text="copy device" Icon="PageWhiteCopy" Cls="topButton">
                    <Listeners>
                        <Click Handler="return confirm('Are you sure you want to do it?');"></Click>
                    </Listeners>
                </ext:Button>
            <ext:Button runat="server" ID="btnPrint" IconAlign="Left" Text="print" Icon="Printer" Cls="topButton" />
        </Items>        
    </ext:Panel>
    and now describe of problem :

    when I add to Device.ascx.cs file some userControl which contains borderlayout in it and I got in Device.ascx file some controls added. Then My application get crushed.

    When I've clear Device.ascx and Add user control with borderlayout in it it's working fine.


    Please let me know what I'm doing wrong with layout.

Similar Threads

  1. Replies: 1
    Last Post: Jul 20, 2012, 8:08 AM
  2. [CLOSED] How should I nested ext.net.controls with user controls?
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 04, 2012, 11:14 AM
  3. Replies: 5
    Last Post: Nov 03, 2011, 2:39 AM
  4. Replies: 2
    Last Post: Feb 16, 2011, 9:10 AM
  5. Replies: 0
    Last Post: Jan 05, 2011, 6:48 AM

Tags for this Thread

Posting Permissions