TreeView
TreeView
Remote Loading
This view shows how to load the node items from a remote url in TreeView for ASP.NET MVC.
Features
Description
You can load the node items from a remote url using the "load-action-url" attribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | using MvcExplorer.Models; using Microsoft.AspNetCore.Mvc; using C1.Web.Mvc.Serialization; namespace MvcExplorer.Controllers { partial class TreeViewController : Controller { // GET: RemoteLoading public ActionResult RemoteLoading() { return View(); } public ActionResult RemoteLoading_LoadAction() { return this .C1Json(Property.GetData(Url), false ); } } } |
1 2 3 4 5 6 7 8 9 10 | < c1-tree-view display-member-path = "Header" child-items-path = "Items" load-action-url = "@Url.Action(" RemoteLoading_LoadAction ")" ></ c1-tree-view > @section Summary{ < p > @Html .Raw(TreeViewRes.RemoteLoading_Text0)</ p > } @section Description{ @Html .Raw(TreeViewRes.RemoteLoading_Text1) } |