【发布时间】:2014-09-23 09:50:38
【问题描述】:
我目前正在使用 DevExpress 的 TreeView,它被用来在我的 ASP mvc 站点中导航。
但是,阅读docs,我似乎找不到任何对实际导航的引用,尤其是当我从xml 文件中绑定数据时。
我的ContentLeftPartialView
<div class="leftPanel">
@* DXCOMMENT: Configure the left panel's treeview *@
@Html.DevExpress().TreeView(settings => {
settings.Name = "LeftTreeView";
}).BindToXML(HttpContext.Current.Server.MapPath("~/App_Data/SideMenu.xml"), "/menu/*").GetHtml()
</div>
了解我的xml 存在的基础
<?xml version="1.0" encoding="utf-8" ?>
<menu>
<group Text="Graphics">
<item Text="General Overview" />
</group>
<group Text="Reports">
<item Text="Report Manager" />
<item Text="Product Delivery Report" />
<item Text="Inventory Report" />
<item Text="Stock Report" />
</group>
<group Text="Stocks">
<item Text="stock 1" />
<item Text="stock 2" />
</group>
<group Text="Systems">
<item Text="system 1" />
<item Text="system 2" />
</group>
<group Text="Lock Interface">
</group>
<group Text="Settings">
</group>
</menu>
我完全不知道应该将ActionLinks/etc 放在哪里,以便能够浏览我的网站(此面板将在所有页面中保持不变)。
有没有人对 DevExpress 的 HTML 5 / MVC 有任何经验来为我指明正确的方向?
我知道另一个项目使用了这个:
public ActionResult Products()
{
ViewBag.Message = "Your Products page.";
return View();
}
但它只是使用了如下链接:
<li>@Html.ActionLink("Products", "Index", "Products")</li>
我认为 DevExpress 的局部视图树视图不会发生这种情况。
【问题讨论】:
标签: c# asp.net-mvc treeview devexpress devexpress-mvc