Jul 29, 2013, 5:47 AM
[CLOSED] Generate Parameters of loader dynamically
I have a container which loads a partial view.
I need to add parameters to it loader dynamically based on the filters seleceted and load the view based on those parameters.
Following is the code:
I need to add parameters to it loader dynamically based on the filters seleceted and load the view based on those parameters.
Following is the code:
@(Html.X().Container()
.ID("ViewContainer2")
.Width(900)
.Hidden(true)
.Loader(Html.X().ComponentLoader()
.Url(Url.Action("LoadSnapShotPartialView"))
.Mode(LoadMode.Script)
.Params(new { containerId = "ViewContainer2" })
)
)
In my script i am doing: var snapShotContainer = Ext.getCmp('ViewContainer2');//.show();
snapShotContainer.loader.paramsFn = getParamForSnapshot();
snapShotContainer.show();
var getParamForSnapshot = function ()
{
var a = { x: "s" };
return a;
}
But its not working. What i am doing wrong?
Last edited by Daniil; Aug 06, 2013 at 8:23 AM.
Reason: [CLOSED]