Hello,
We have a need to create Tab panels dynamically for a project. The problem we are experiencing is that when the user control is adding to the TabPanel dynamically, the data that is bound to the User Control is not showing up on the webpage. The User Control displays fine if it is loaded on webpage without being inside the TabPanel. We are running Ext.NET ver 1.3 on Windows XP using IE 8.

Can anyone please show us what is wrong in our code?

Your help is greatly appreciated. Thank you very much in advance.

Below is the code for the calling page:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testPage.aspx.cs" Inherits="Web.Pages.testPage" %>

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

<%@ Register src="../UserControls/testCtr.ascx" tagname="testCtr" tagprefix="uc2" %>
<script runat="server">     
protected void Page_Load(object sender, EventArgs e)
        {
            int[] index = { 1 };
            var tab = new Panel
                            {
                                ID = "TabBreadLine_" + index[0],
                                AutoHeight = true,
                                Title = "TabBreadLine_" + index[0],
                                Padding = 6
                            };


            var userControl = LoadControl("~/UserControls/testCtr.ascx");
            tab.ContentControls.Add(userControl);


            TabBakeryLines.Items.Add(tab);
            TabBakeryLines.Render();
        }
 </script> 

<!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">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
   
    <div>
        <ext:TabPanel ID="TabBakeryLines" runat="server" AutoHeight="true" EnableTabScroll="true"
        StyleSpec="padding-left:2px;" />
     
    </div>
    </form>
</body>
</html>
Below is the code we are using for the User Control:
<script runat="server">     
 protected void Page_Load(object sender, EventArgs e)
        {
            BindProductsGrid();
        }
        protected void BindProductsGrid()
        {
            this.RunStore.DataSource = new object[] {
                    new object[] {8, "Prem Onion Buns 10Oz/4P Oro" },
                    new object[] {9, "Roman Meal Wg Hotdog Buns 13Oz/8P Rom" },
                    new object[] {2, "Sandwich White 24Oz Ins Ri"},
                };

            this.RunStore.DataBind();
        }
 </script> 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="testCtr.ascx.cs" Inherits="Web.UserControls.testCtr" %>
                            <ext:GridPanel ID="GridPanel1" runat="server" Title="Runs" Margins="0 0 0 0" Icon="ScriptGo"
                                Height="500" Width="463" BodyCssClass="x-grid3-row-selected x-grid-group-title"
                                StripeRows="true" TrackMouseOver="true" Frame="false" Border="false" Padding="0"
                                HideBorders="true">
                                <store>
                                    <ext:Store ID="RunStore" runat="server">
                                        <Reader>
                                            <ext:ArrayReader>
                                                <Fields>
                                                    <ext:RecordField Name="WrappedUnit" Type="Int" />
                                                    <ext:RecordField Name="DoughName" Type="String" />
                                                </Fields>
                                            </ext:ArrayReader>
                                        </Reader>
                                    </ext:Store>
                                </store>
                                
                                <ColumnModel ID="ColumnModel1" runat="server">
                                    <Columns>
                                        <ext:Column DataIndex="WrappedUnit" Header="Wrapped<br/>Unit" Width="55" Align="Center" />
                                        <ext:Column DataIndex="DoughName" Header="Dough Name" Width="132" Align="Center" />
                                    </Columns>
                                </ColumnModel>
                            </ext:GridPanel>