Jun 02, 2014, 1:45 PM
[CLOSED] Add panel with tabmenu in AjaxResult
Hi guys,
I 'd like to dynamically add a panel with a tabMenu in Ajax. Actually, I can add my panel without my tabMenu.
My ajaxresult function
Regards
I 'd like to dynamically add a panel with a tabMenu in Ajax. Actually, I can add my panel without my tabMenu.
My ajaxresult function
public AjaxResult AddDashTab(string url, string idTab, string title)
{
AjaxResult response = new Ext.Net.MVC.AjaxResult();
var tabPanel = this.GetCmp<TabPanel>("PanelTab");
Panel panel = new Panel { ID = idTab, Title = title, IconCls = "DashboardIcon", Closable = true, Border = false, Layout = LayoutType.Fit.ToString() };
ComponentLoader loader = new ComponentLoader { Url = url, Mode = LoadMode.Frame };
loader.LoadMask.ShowMask = true;
loader.LoadMask.Msg = _resourcesService.GetResource("Javascript", "PreparingDisplay");
panel.Loader = loader;
string menuName = string.Format("MenuTab{0}", idTab);
MenuPanel menu = new MenuPanel(){ID=menuName};
menu.Menu.Add(new MenuItem() { Text = "test" });
panel.AddTo(tabPanel);
panel.Items.Add(menu);
tabPanel.SetActiveTab(idTab);
//response.Script = menu.ToScript(RenderMode.AddTo, menuName);
response.Script += panel.ToScript(RenderMode.AddTo, idTab);
return response;
}
my callExt.net.DirectMethod.request({
url: AppPath + "DashboardConfig/AddDashTab",
contentType: 'application/json; charset=utf-8',
type: 'POST',
params: {
url: urlFrame,
idTab: idTab,
title: type
},
success : function (result) {
tabPanel.setActiveTab(idTab);
}
});
Do you know how to show the tabMenu ?Regards
Last edited by Daniil; Jun 10, 2014 at 3:00 PM.
Reason: [CLOSED]