TreeView
TreeView
Images
This view shows how to add images to the nodes in a TreeView control.
Features

Trimmers/Shavers
Tablets

Apple
Motorola
Nokia
Samsung
Speakers
Monitors

Shopkins
Train Sets
Science Kit
Play-Doh
Crayola

Coffeee Maker
Breadmaker
Solar Panel
Work Table
Propane Grill
Description
Use the "image-member-path" attribute to add images to nodes by specifying the name of a property on the data items that contains an image URL.
In this sample, the source contains the Image field, which value is an image url. "Image" is set to the "image-member-path" attribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | using MvcExplorer.Models; using Microsoft.AspNetCore.Mvc; namespace MvcExplorer.Controllers { partial class TreeViewController { // GET: Images public ActionResult Images() { return View(Property.GetData(Url)); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 | @model Property[] < c1-tree-view display-member-path = "Header" child-items-path = "Items" image-member-path = "Image" source = "Model" ></ c1-tree-view > @section Summary{ < p > @Html .Raw(TreeViewRes.Images_Text0)</ p > } @section Description{ < p > @Html .Raw(TreeViewRes.Images_Text1)</ p > < p > @Html .Raw(TreeViewRes.Images_Text2)</ p > } |