Apr 09, 2013, 9:57 PM
[CLOSED] Razor tabpanel tabs, gridpanels and dynamic content
Hi Guys
So I have looked at the partial dynamic rendering and got it working loading my content with an empty grid panel. Next challenge is getting data into each or the tabs I create.
From what I am reading I would need to dynamic generate all the object for the tab in the controller?
e.g.
http://forums.ext.net/showthread.php...dpanel-problem - which I haven't got working yet, also looking at the way to correctly add tabs as per
http://forums.ext.net/showthread.php...ab-to-TabPanel - does not seam to work
Code I have to test in my controller is called from a direct event
So remember the end game here would be to click the button and have new tab created with all the stores, grids, form object etc.
So I have looked at the partial dynamic rendering and got it working loading my content with an empty grid panel. Next challenge is getting data into each or the tabs I create.
From what I am reading I would need to dynamic generate all the object for the tab in the controller?
e.g.
http://forums.ext.net/showthread.php...dpanel-problem - which I haven't got working yet, also looking at the way to correctly add tabs as per
http://forums.ext.net/showthread.php...ab-to-TabPanel - does not seam to work
Code I have to test in my controller is called from a direct event
public void OrderTab( string containerId)
{
//var result = new PartialViewResult
//{
// ViewName = "OrderTab",
// ContainerId = containerId,
// RenderMode = RenderMode.AddTo
//};
var result = new Ext.Net.Panel()
{
ID = "tab" + this.GetCmp<TabPanel>(containerId).Items.Count + 1,
Title = "ServerTab" + this.GetCmp<TabPanel>(containerId).Items.Count + 1,
Html = "foo"
};
result.AddTo(this.GetCmp<TabPanel>(containerId));
this.GetCmp<TabPanel>(containerId).SetActiveTab(result.ClientID);
//return result;
//return new DirectResponse();
}
when I click my button the code runs but it don't get anything.So remember the end game here would be to click the button and have new tab created with all the stores, grids, form object etc.
Last edited by Daniil; Apr 11, 2013 at 4:58 PM.
Reason: [CLOSED]