TreeView
TreeView
Remote Loading
This view shows how to load the node items from a remote url in TreeView for ASP.NET MVC.
Features
Sample
Description
You can load the node items from a remote url using the "load-action-url" attribute.
Source
RemoteLoadingController.cs
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);
}
}
}
RemoteLoading.cshtml
<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)
}
Documentation