TreeView
TreeView
Remote Loading
This view shows how to load the node items from a remote url in TreeView for ASP.NET MVC.
Features
Electronics
Trimmers/Shavers
Tablets
Phones
Apple
Motorola
Nokia
Samsung
Speakers
Monitors
Toys
Shopkins
Train Sets
Science Kit
Play-Doh
Crayola
Home
Coffeee Maker
Breadmaker
Solar Panel
Work Table
Propane Grill
Description
You can load the node items from a remote url using the Bind(string loadActionUrl) method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | using C1.Web.Mvc.Serialization; using MvcExplorer.Models; using System.Web.Mvc; namespace MvcExplorer.Controllers { partial class TreeViewController : Controller { // GET: RemoteLoading public ActionResult RemoteLoading() { return View(); } public ActionResult RemoteLoading_LoadAction() { return this .C1Json(Property.GetData(Url), useCamelCasePropertyName: false ); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 | @ (Html.C1().TreeView() .Bind(Url.Action( "RemoteLoading_LoadAction" )) .DisplayMemberPath( "Header" ) .ChildItemsPath( "Items" )) @section Summary{ < p > @Html .Raw(Resources.TreeView.RemoteLoading_Text0)</ p > } @section Description{ @Html .Raw(Resources.TreeView.RemoteLoading_Text1) } |