May 15, 2012, 3:55 PM
Using Ext.NET v1.3, I need to ADD a User Control to each Tab dynamically...
Hi,
I am trying to load my existing User Control to each Tab that is creating.
I tried 'tab.LoadContent' but it doesn't seems to work. Please help.
.cs
I am trying to load my existing User Control to each Tab that is creating.
I tried 'tab.LoadContent' but it doesn't seems to work. Please help.
.cs
var controller = new FormDetailsController();
var lines = controller.GetLinesForBakery(CurrentBakeryId);
int[] index = {1};
foreach (var tab in lines.Select(line => new Panel
{
ID = "TabBreadLine" + index[0],
AutoHeight = true,
Title = line.Description.Trim(),
Padding = 6
}))
{
tab.LoadContent(new LoadConfig("C:/DATA/Projects/Wildcat_v2/Web/UserControls/Runs.ascx", LoadMode.IFrame, true));
tab.Html = DateTime.Now.ToLongTimeString() + " Tab: " + index[0]; //Test
tab.Render(TabBakeryLines, RenderMode.AddTo);
index[0]++;
}
.aspx <ext:TabPanel ID="TabBakeryLines" runat="server" AutoHeight="true" StyleSpec="padding-left:2px;" />