Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
using
System;
System.Collections.Generic;
Telerik.Web.UI;
namespace
Telerik.Web.Examples.Menu.ShowPath
{
public
partial
class
DefaultCS : System.Web.UI.Page
protected
void
Page_Load(
object
sender, EventArgs e)
RadTreeView1.ExpandAllNodes();
RadTreeNode currentNode = RadTreeView1.FindNodeByUrl(Request.Url.PathAndQuery);
if
(currentNode !=
null
)
//Select the current item and his parents
HighlightPath(currentNode);
PageTitleLiteral.Text = currentNode.Text;
//Populate the breadcrumb
DataBindBreadCrumbSiteMap(currentNode);
}
HighlightPath(RadTreeNode currentNode)
while
(!currentNode.CssClass.Contains(
"focused"
))
currentNode.CssClass =
;
currentNode = currentNode.Owner
as
RadTreeNode;
private
DataBindBreadCrumbSiteMap(RadTreeNode currentNode)
List<RadTreeNode> breadCrumbPath =
new
List<RadTreeNode>();
breadCrumbPath.Insert(0, currentNode);
BreadCrumbSiteMap.DataSource = breadCrumbPath;
BreadCrumbSiteMap.DataBind();
.focused
background-color
: Yellow
!important