The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

TabPanel TabChange event not updating active tab index?

  1. #1

    [0.8] TabPanel TabChange event not updating active tab index?

    I'm having an issue with the following code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CooliteTesting._Default" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <head runat="server">
        <ext:ScriptManager ID="extScriptManager" runat="server" />
    And the code behind:

        public partial class _Default : System.Web.UI.Page
            protected void Page_Load(object sender, EventArgs e)
                ViewPort viewPort = new ViewPort();
                viewPort.ID = "mainViewPort";
                RowLayout rowLayout = new RowLayout();
                rowLayout.ID = "mainRowLayout";
                LayoutRow row1 = new LayoutRow();
                row1.RowHeight = 0.5M;
                TabPanel tabPanel = new TabPanel();
                tabPanel.Title = "Tab Panel";
                tabPanel.AjaxEvents.TabChange.Event += TabPanel_Change;
                Tab tab1 = new Tab();
                tab1.Title = "Tab 1";
                Tab tab2 = new Tab();
                tab2.Title = "Tab 2";
                Tab tab3 = new Tab();
                tab3.Title = "Tab 3";
                LayoutRow row2 = new LayoutRow();
                row2.RowHeight = 0.5M;
                Panel panel = new Panel();
                panel.Title = "Panel";
            private void TabPanel_Change(object sender, AjaxEventArgs e)
                TabPanel tabPanel = (TabPanel)sender;
                int activeTabIndex = tabPanel.ActiveTabIndex; // Always 0
    Any ideas?
    Last edited by riverspiv; Oct 16, 2010 at 2:27 PM.
  2. #2
    This is really frustrating...can anybody help with this? The TabChange event fires like it should, but the active tab is always the first one. How can this be? I tried setting AutoPostBack = true on the TabPanel, but all that succeeded in doing was disabling the changing of the tabs at all.

    This has to be a simple fix -- some property I'm not setting? I'm really at a loss on how to fix this...

    Also, I am looking for a code behind solution.
  3. #3

    You have no ASP.NET form therefore there is no automatic submit
    Vladimir Shcheglov
    Sr. Developer
  4. #4
    Quote Originally Posted by Vladimir View Post

    You have no ASP.NET form therefore there is no automatic submit
    I knew it was something simple I was overlooking. I got it working now, thanks!

Similar Threads

  1. Replies: 6
    Last Post: Oct 13, 2011, 12:55 PM
  2. TabPanel load panel in TabChange
    By naina in forum 1.x Help
    Replies: 1
    Last Post: Aug 02, 2011, 4:43 PM
  3. Replies: 2
    Last Post: Jul 06, 2010, 5:27 PM
  4. Replies: 2
    Last Post: Apr 25, 2010, 3:15 AM
  5. [CLOSED] CardLayout Active Index Layout Prob
    By amitpareek in forum 1.x Premium Help
    Replies: 10
    Last Post: Jan 25, 2010, 5:28 PM

Posting Permissions