May 29, 2012, 2:56 PM
[CLOSED] Tab Panel reload
Hi,
I need to reload the content of a couple of tabs on the page on the ComboBox Select direct event. My server code looks similar to this:
Edit in: While we are at it, the server side TabPanel1.Items don't contain any dynamically created in Javascript tabs. What's the right way to access those tabs in the direct event?
Thanks,
Vadym
I need to reload the content of a couple of tabs on the page on the ComboBox Select direct event. My server code looks similar to this:
protected void ComboInvestigators_Select(object sender, DirectEventArgs e)
{
var tab1 = this.TabPanel1.Items.FirstOrDefault<Component>(comp => comp.ID.Equals("tab1"));
if (tab1 != null)
(tab1 as Ext.Net.Panel).Reload();
var tab2 = this.TabPanel1.Items.FirstOrDefault<Component>(comp => comp.ID.Equals("tab2"));
if (tab2 != null)
(tab2 as Ext.Net.Panel).Reload();
}
The markup for the TabPanel with the Listener: <ext:TabPanel ID="TabPanel1" runat="server" Region="Center"
EnableTabScroll="true">
<Items>
<ext:Panel ID="tab1" runat="server" Title="Tab 1">
<AutoLoad Mode="IFrame" Url="~/TabPage1.aspx" ShowMask="true" />
<Listeners>
<Activate Handler="PanelExplorer.layout.setActiveItem(#{MenuPanel1});
PanelExplorer.items.each(function (item) {
if (item.menu.rendered) {
item.clearSelection();
}
});
PanelExplorer.getComponent('MenuPanel1').setSelection(#{mnTab1});" Delay="1" />
</Listeners>
</ext:Panel>
</Items>
</ext:TabPanel>
The first tab is static while others are created dynamically. This works fine when the reloaded tab panel is the selected panel. Otherwise, inactive tab panels display distorted and partially loaded content after reloading that way. Please suggest a solution to the issue.Edit in: While we are at it, the server side TabPanel1.Items don't contain any dynamically created in Javascript tabs. What's the right way to access those tabs in the direct event?
Thanks,
Vadym
Last edited by Daniil; May 30, 2012 at 6:38 PM.
Reason: [CLOSED]