Metro skin

SiteMap - Server-side Events

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

RadSiteMap introduces two server-side events for working with nodes:

  • NodeCreated occurs when a new node is added to the control (at any level)
  • NodeDataBound occurs when a node is bound to a data source

This example shows how to use the NodeDataBound event to filter certain nodes. The nodes are then processed in the DataBound event and the total children count for each node is displayed.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="SiteMap.Examples.ServerEvents.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadSiteMapDataSource runat="server" ID="RadSiteMapDataSource1" ShowStartingNode="false"

    <div class="demo-container">
        <telerik:RadSiteMap runat="server" ID="SiteMap1" DataSourceID="RadSiteMapDataSource1">
                <telerik:SiteMapLevelSetting Level="0">
                    <ListLayout RepeatColumns="3" RepeatDirection="Horizontal" AlignRows="true"></ListLayout>
                <telerik:RadSiteMapNodeBinding NavigateUrl="#"></telerik:RadSiteMapNodeBinding>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?