ActiveTabIndex

  1. #1

    ActiveTabIndex

    Hello,

    I have a tabpanel within a panel.
    In one of the tab I have another tabpanel on the bottom side.
    When I load the page I have an error about the activeIndextab = 0.
    At the moment it loads the page, the second tabpanel is not loaded yet so the error.
    If I don't set the activeIndexTab it works but when I click on the tab it shows nothing (blank content).

    What can I do to show the content of the tab ?

    Thanks.

    Here a sample of code :
    <ext:TabPanel ID="tabPanel1" runat="server">
      <Content>
    <ext:Panel ID="tab1" runat="server" Title="tab1">
      <Content>
        ...
      </Content>
    </ext:Panel>
    <ext:Panel ID="tab2" runat="server" Title="tab2" ActiveTabIndex="0"> // <-- here I have an error at runtime
      <Content>
        <ext:TabPanel ID="tabPanel2" runat="server" TabPosition="Bottom">
          <Content>
            <ext:Panel ID="tab21" runat="server" Title="tab21">
              <Content>
                ...
              </Content>
            </ext:Panel>
            <ext:Panel ID="tab22" runat="server" Title="tab22">
              <Content>
                ...
              </Content>
            </Content>
       </ext:Panel>
      </ext:Panel>
      </Content>
    </ext:Panel>
    </Content>
    </ext:TabPanel>
  2. #2
    Place child Tabs inside <Items>, not <Content>.

    <ext:TabPanel ID="TabPanel3" runat="server" Height="300">
            <Items>
                <ext:Panel ID="Panel1" runat="server" Title="Tab 1">
                    <Items>
                            <ext:Panel ID="myChildPanel" runat="server">
                                 <Content>
                                      Here I can place My HTML
                                 </Content>
                             </ext:Panel>
                             <ext:Label ID="lbl" runat="server" Text="Or any other control here."></ext:Label>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel2" runat="server" Title="Tab 2">
                    <Items>
                        <ext:TabPanel ID="TabPanel4" runat="server" Height="300" ActiveIndex="1">
                            <Items>
                                <ext:Panel ID="Panel3" runat="server" Title="Tab 1">
                                    <Items>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="Panel4" runat="server" Title="Tab 2">
                                    <Items>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:TabPanel>
                    </Items>
                </ext:Panel>
            </Items>
        </ext:TabPanel>
    Last edited by paul-2011; Jan 18, 2011 at 7:12 PM.
  3. #3
    Thanks !
    It works.

Similar Threads

  1. [CLOSED] How to FindOut ActiveTabIndex for MenuItems
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 11, 2010, 1:06 PM
  2. Set value to ActiveTabIndex.
    By flaviodamaia in forum 1.x Help
    Replies: 3
    Last Post: Mar 26, 2010, 2:45 PM
  3. Replies: 4
    Last Post: Dec 03, 2008, 4:54 AM
  4. [CLOSED] change Activetabindex
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 18, 2008, 9:08 AM
  5. [CLOSED] ActiveTabIndex
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 18, 2008, 6:08 AM

Tags for this Thread

Posting Permissions