Mar 08, 2016, 10:24 AM
TreePanel MVC onClick Node to Action
Hello.
I am using a TreePanel component and i have a problema to send to the action the id or name of the clicked node.
The cshtml is like:
But i don't know how pass it to the action.
I am using a TreePanel component and i have a problema to send to the action the id or name of the clicked node.
The cshtml is like:
X.TreePanel()
.Width(300)
.DirectEvents(m=>
{
m.ItemClick.Url = Url.Action("onClick");
}
)
.Root(Model)
I load the treepanel with the SiteMap:public ActionResult PruebasRoberto()
{
SiteMapNode siteNode = SiteMap.RootNode;
Node root = new Node();
root.Text = "Principal";
root.AllowDrag = false;
root.Expanded = true;
ExtNetModel.LoadNodes(siteNode, root);
return this.View(root);
}
and i need to know the clicked node text, description or something in the action "OnClick".But i don't know how pass it to the action.
public ActionResult onClick(Node o)
{
return this.Direct();
}
Any Idea?