View Full Version : [CLOSED] V2.1 TabPanel and Refresh Help

Aug 12, 2012, 1:50 PM
Hi, i have a formaPanel with Two TabPanel, my problem is then assign the value to combobox in the second panel, but not select the tabPanel two..

1) Load the page and press the button "Load", the record is load in the form and assign the value "3" at comboox..
If press save, the combobox.value is null...

2)Load the page press the button "Load",the record is load in the form and assign the value "3" at comboox.. press the tabTwo.
Now if press save, the combobox value is ok..

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ARWebRevolution.WebForm1" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="">
<ext:Store ID="StoreTrasporti" runat="server">
<ext:Model ID="Model1" runat="server" IDProperty="TraId">
<ext:ModelField Name="TraId" />
<ext:ModelField Name="TraDes" />
<ext:DataSorter Property="TraDes" Direction="ASC" />
<ext:Viewport ID="ViewportFornitori" runat="server" Layout="BorderLayout">
<ext:FormPanel ID="FormPanelFornitore" runat="server" ButtonAlign="Right" Cls="formMargins"
BodyPadding="5" Padding="3" Region="Center" DefaultButton="ButtonSave" Title="Fornitore..."
Layout="FormLayout" AnchorVertical="100%" MinWidth="300">
<FieldDefaults LabelWidth="90" />
<ext:TabPanel ID="TabPanelFornitori" runat="server" Anchor="100% 100%">
<ext:Panel ID="Panel1" runat="server" Title="Panel One" Padding="5" Layout="AnchorLayout">
<ext:TextField ID="TextField1" runat="server" Name="TraDes" Width="250">
<ext:Panel ID="Panel2" runat="server" Title="Panel Two" Padding="5" Layout="AnchorLayout">
<ext:ComboBox ID="ComboBoxTrasporto" runat="server" TypeAhead="true" AnchorHorizontal="100%"
StoreID="StoreTrasporti" QueryMode="Local" ForceSelection="false" TriggerAction="All"
FieldLabel="Trasporto" Name="TraId" DisplayField="TraDes" ValueField="TraId"
EmptyText="Seleziona un trasporto..." FieldStyle="text-transform:uppercase;">
<ext:FieldTrigger Icon="Clear" Qtip="Rimuovi selezionato" />
<TriggerClick Handler="this.clearValue()" />
<ext:Toolbar runat="server" ID="ToolBarFornitore">
<ext:Button ID="ButtonNew" runat="server" Text="Load" Scale="Medium" Icon="Add"
ToolTip="Save" ToolTipType="Title">
<Click OnEvent="Save" />
<ext:Button ID="ButtonSave" runat="server" Text="Salva" Scale="Medium"
Icon="Accept" ToolTip="Salva le modifiche apportate"
ToolTipType="Title" >
<Click OnEvent="SaveFornitore" />

using System;
using System.Linq;
using Ext.Net;

namespace ARWebRevolution
public partial class WebForm1 : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
StoreTrasporti.DataSource = Data;


private new System.Collections.Generic.List<object> Data
return new System.Collections.Generic.List<object>
new { TraId = "1", TraDes="Pisolo" },
new { TraId = "2", TraDes="Mammolo"},
new { TraId = "3", TraDes="Brontolo"}

protected void Save(object sender, DirectEventArgs e)

FormPanelFornitore.SetValues(new { TraId = "3", TraDes = "Brontolo" });
ComboBoxTrasporto.Value = "3";


protected void SaveFornitore(object sender, DirectEventArgs e)
ExtNet.MessageBox.Alert("Title","ComboBox.Value = " + ComboBoxTrasporto.Value).Show();

Thanks for any help


Aug 13, 2012, 6:34 AM

By default an inactive tab is not rendered before first activation. Respectively, a ComboBox is not rendered as well. Therefore, its value is not in POST before activating the second tab.

To get all tabs to be rendered, please set up:

for the TabPanel.

Though, sure, you will lose the TabPanel performance benefit, i.e. rendering tabs on the fly on first activation.

You also can cause the second tab to be rendered programmatically calling


P.S. Please note that you can place the code behind directly on ASPX page wrapping in:

<script runat="server">
//code behind
and leave only

<%@ Page Language="C#" %>

It would allow us to run your code samples without any changes from our side.

Aug 13, 2012, 7:07 AM

Thanks for the help, i test the second option (rendered programmatically) and it's work OK...

Set the second tab and set the first tab, it's work fine.



Aug 13, 2012, 7:15 AM
You also can set up

TabPanel1.ActiveTabIndex = 1;
from code behind or in markup

ActiveTabIndex = "1"

Aug 13, 2012, 7:47 AM

Yes the code, "TabPanel1.ActiveTabIndex = 1" work ok

But the open a window and select the record for the grid, i need to the activeTab is the 0.


Aug 13, 2012, 7:54 AM
You can set up an Activate listener for the second tab to active the first tab.

Aug 13, 2012, 9:45 AM