TreeView
リモートロード
このビューは、リモート URL から TreeView for ASP.NET MVC にノード項目をロードする方法を示します。
機能
サンプル
説明
「load-action-url」属性を使用して、リモート URL からノード項目をロードできます。
ソース
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)
}
マニュアル