PDA

View Full Version : [CLOSED] tabPanel reloadStore



FpNetWorth
Jan 29, 2013, 8:07 AM
Hi all,

I have a problem in reloading the store in a panel.

I have the following panel's architecture:
Tab Panel


<ext:TabPanel ID="tabPanelId" Width="960" runat="server" Height="599"
Padding="1">
<Items>
<ext:Panel ID="panel1" runat="server" Title="panel1"
Height="544">
<Loader Url="/PL/EmployerProfilePl/panel1.aspx"
Mode="Frame" runat="server">
<LoadMask ShowMask="true" Msg="laoding panel1">
</LoadMask>
</Loader>
</ext:Panel>
</Items>
</ext:TabPanel>


panel1
In this tab, I have an "Add Button".
On AddButton's click, I add a new tab, called panel2, with the following code:


var addTab = function (tabId, url, title, entityTypeId, entityId, id) {
var tabPanel;
var panel;

tabPanel = tabPanelId;
panel = tabPanel.add({
id: tabId,
title: title,
closable: true,

loader: {
url: url,
renderer: "frame",
loadMask: {
showMask: true,
msg: "Loading " + title
},
scripts: true,
params: {
"entityTypeId": entityTypeId,
"entityId": entityId,
"id": id
}
}
});
tabPanel.setActiveTab(panel);
};


Panel2
In this tab, I have a "Close Button".
On Close button's click, I want to close the panel2, and reload a store located in the panel 1.
To close the panel2, I use the following code:


tabPanel.closeTab('panel2');


The close tab is working, but the store does not reload.
In the v1.3, I use the following code to reload the store:


panel1.getBody().store1.reload();


Thanks in advance.
Best regards

Daniil
Jan 29, 2013, 10:44 AM
Hi @FpNetWorth,

There is the default "App" namespace in Ext.NET v2. So, please try this.

App.panel1.getBody().App.store1.reload();

FpNetWorth
Jan 30, 2013, 9:02 AM
Hi @FpNetWorth,

There is the default "App" namespace in Ext.NET v2. So, please try this.

App.panel1.getBody().App.store1.reload();

Great,
Thank you Daniil, it works now.
I missed to call namespace before the store.