Sep 07, 2008, 2:28 PM
[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:
1. Load page
2. Click "Switch it"
3. Note exception regarding Tab2 does not belong to Tabs1 TabPanel
Cheers,
Timothy
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" onclick="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