[FIXED] [V0.6] TabPanel and SetActiveTab

  1. #1

    [FIXED] [V0.6] TabPanel and SetActiveTab

    Hello,

    Just found a problem with using the TabPanel SetActiveTab I'm wondering if it has something to do with the new work done on the TabPanel class.

    Example.aspx:
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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 override void  OnInit(EventArgs e)
        {
            Control control = Page.LoadControl("Example-Control.ascx");
                
            UserControl.Controls.Add(control);
            
            base.OnInit(e);
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
            <ext:ScriptManager ID="ScriptManager2" runat="server" />
                    <asp:PlaceHolder ID="UserControl" runat="server" />
        </form>
    </body>
    </html>
    Example-Control.ascx:
    <%@ Control Language="C#" ClassName="Example_Control" %>
    
    <script runat="server">
        protected void btnDemo_Click(object sender, EventArgs e)
        {
            Tabs1.SetActiveTab(Tab2);
        }
    </script>
            <ExtJS:TabPanel ID="Tabs1" runat="server" ActiveTabIndex="0" AutoPostBack="True" AutoHeight="True" AutoWidth="True" DeferredRender="True">
                <Tabs>
                    <ExtJS:Tab ID="Tab1" runat="server" Title="Tab1" AutoHeight="True" AutoWidth="True">
                        <Content>
                            <ExtJS:Button ID="btnDemo" runat="server" AutoPostBack="True" &#111;nclick="btnDemo_Click" Text="Switch it" />
                            Tab 1
                        </Content>
                    </ExtJS:Tab>
                    <ExtJS:Tab ID="Tab2" runat="server" Title="Tab2" AutoHeight="True" AutoWidth="True">
                        <Content>
                            Tab 2
                        </Content>
                    </ExtJS:Tab>
                </Tabs>
            </ExtJS:TabPanel>
    Replication steps:

    1. Load page
    2. Click "Switch it"
    3. Note exception regarding Tab2 does not belong to Tabs1 TabPanel

    Cheers,
    Timothy
  2. #2

    RE: [FIXED] TabPanel and SetActiveTab

    Found the fix:

    TabPanelBase.cs:491
            public virtual void SetActiveTab(Tab tab)
            {
                this.SetActiveTab(tab.ClientID);
            }
    Should be:

            public virtual void SetActiveTab(Tab tab)
            {
                this.SetActiveTab(tab.ID);
            }
    Cheers,
    Timothy
  3. #3

    RE: [FIXED] TabPanel and SetActiveTab

    This is fixed in SVN, you can mark fixed!

Similar Threads

  1. Replies: 1
    Last Post: Nov 26, 2010, 3:30 PM
  2. [FIXED] [1.0] Bug in TabPanel
    By juane66 in forum Bugs
    Replies: 10
    Last Post: Jan 28, 2010, 9:53 AM
  3. [FIXED] [V0.8.0] TabPanel index bug
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Jan 29, 2009, 10:12 AM
  4. [FIXED] [V0.6] TabPanel and GridPanel
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Sep 07, 2008, 12:42 PM
  5. [CLOSED] TabPanel.SetActiveTab with PostBack
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 14, 2008, 12:38 PM

Posting Permissions