[CLOSED] TabStrip with ActionContainerID question

  1. #1

    [CLOSED] TabStrip with ActionContainerID question

    Hello,
    How can i add TabStrip with ActionContainerID to an ASP.NET Web Page Programmatically?
    Best Regards
    ViDom
    Last edited by Daniil; Apr 09, 2012 at 7:59 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please clarify do you use Ext.NET v1 or v2?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Please clarify do you use Ext.NET v1 or v2?
    I use version 2 latest.
  4. #4
    Thanks.

    Do you need to add a TabStrip for already rendered "ActionContainerID"?

    If so, it's not supported. You will need to re-render the "ActionContainerID" container.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void CreateTabStrip(object sender, DirectEventArgs e)
        {
            TabStrip tabStrip = new TabStrip()
            {
                ID = "TabStrip1",
                ActionContainerID = "Panel1",
                Items =
                {
                    new Tab("Summary"),
                    new Tab("Data")
                }
            };
    
            Toolbar1.Items.Add(tabStrip);
    
            this.Panel1.Render();
    
            tabStrip.SetActiveTab(0);
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Button runat="server" Text="Create TabStrip" OnDirectClick="CreateTabStrip" />
    
            <ext:Panel 
                ID="Panel1" 
                runat="server" 
                Height="105" 
                Width="350" 
                Layout="CardLayout" 
                ActiveIndex="0"
                DefaultBorder="false"
                DefaultPadding="5">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server" StyleSpec="padding-bottom:0px;" />
                </TopBar>
                <Items>
                    <ext:Panel runat="server" Html="Summary" Header="false" />
                    <ext:Panel runat="server" Html="Data" Header="false" />
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
  5. #5
    How can i add to tabs items like other controls from code?
    For example u add here plain html text
    <Items>
                    <ext:Panel runat="server" Html="Summary" Header="false" />
                    <ext:Panel runat="server" Html="Data" Header="false" />
                </Items>
    And i wanna add in each panel my own controls Like Labels/Buttons/etc.
    Last edited by Daniil; Apr 03, 2012 at 9:56 AM. Reason: Please use [CODE] tags
  6. #6
    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void CreateTabStrip(object sender, DirectEventArgs e)
        {
            TabStrip tabStrip = new TabStrip()
            {
                ID = "TabStrip1",
                ActionContainerID = "Panel1",
                Items =
                {
                    new Tab("Summary"),
                    new Tab("Data")
                }
            };
     
            Toolbar1.Items.Add(tabStrip);
    
            Ext.Net.Panel tab1 = new Ext.Net.Panel()
                {
                    Items =
                    {
                        new Ext.Net.Label("Tab 1")
                    }
                };
    
            this.Panel1.Items.Add(tab1);
    
            Ext.Net.Panel tab2 = new Ext.Net.Panel()
            {
                Items =
                    {
                        new Ext.Net.Label("Tab 2")
                    }
            };
    
            this.Panel1.Items.Add(tab2);
     
            this.Panel1.Render();
     
            tabStrip.SetActiveTab(0);
        }
    </script>
     
    <!DOCTYPE html>
     
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
     
            <ext:Button runat="server" Text="Create TabStrip" OnDirectClick="CreateTabStrip" />
     
            <ext:Panel
                ID="Panel1"
                runat="server"
                Height="105"
                Width="350"
                Layout="CardLayout"
                DefaultBorder="false"
                DefaultPadding="5">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server" StyleSpec="padding-bottom:0px;" />
                </TopBar>
            </ext:Panel>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] TabStrip not Resizing
    By egvt in forum 1.x Premium Help
    Replies: 2
    Last Post: May 23, 2012, 4:58 PM
  2. [CLOSED] creating tabStrip in javascript
    By supera in forum 2.x Premium Help
    Replies: 2
    Last Post: May 10, 2012, 6:58 PM
  3. Problem with panels in TabStrip
    By JosefTrbusek in forum 1.x Help
    Replies: 7
    Last Post: Nov 23, 2011, 10:26 AM
  4. I can not find the tabstrip why?
    By Fabrizio in forum 1.x Help
    Replies: 3
    Last Post: Jun 15, 2010, 3:49 PM
  5. [CLOSED] tabstrip titles get cut off after re-styling
    By UGRev in forum 1.x Premium Help
    Replies: 7
    Last Post: Apr 20, 2010, 2:55 AM

Posting Permissions