PDA

View Full Version : [CLOSED] MVC 3 [Razor] TabPanel Content Loading



dheeraj_us
Sep 14, 2012, 5:35 PM
I$ am using MVC3 W/ Razor and Telerik controls andd I need to replace the Telerik Tabs with Ext.Net TabPanel.
Question:
How do I load the content from the Controller to a TabPanel?
Is there a method that will accept the ActionName, ControllerName and the RouteValues (like the LoadContentFrom from Telerik)? (I need to replace the existing Telerik control with the Ext.Net TabPanel)

Vladimir
Sep 15, 2012, 12:57 PM
Use Loader for a tab

Content loading


.Loader(Html.X().ComponentLoader()
.Url(Url.Action("AutoLoadPartialView"))
.Mode(LoadMode.Script)
.Params(new { containerId = "TabPanel1" })
)

public PartialViewResult AutoLoadPartialView(string containerId)
{
return new PartialViewResult
{
ContainerId = containerId,
ViewName = "PartialView",
WrapByScriptTag = false
};
}



For Items loading


public PartialViewResult LoadView(string containerId)
{
return new PartialViewResult {
ViewName = "CenterView",
ContainerId = containerId,
RenderMode = RenderMode.AddTo
};
}




If you update from 2.1 branch then you will find MVC examples expolorer. It contains samples demonstrate how to load items/content
http://svn.ext.net/premium/branches/2.1

dheeraj_us
Sep 18, 2012, 7:22 PM
I got the fix, this thread can be closed.