New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Client-side API



  • Demo Configurator
Get/Set Items

RadBreadcrumb for ASP.NET AJAX is based on the Kendo UI Breadcrumb Widget. Thus, it exposes the Client-side API and methods offered by the widget and mainly provides a wrapper and API for working with the Breadcrumb on the server.
You can get Client-side Object Reference to the Breadcrumb control in order to use its API like this:

var RadBreadcrumbObject = $find("<%=RadBreadcrumb1.ClientID %>");

The most commonly used RadBreadcrumb client-side methods are:

  • get_items—Returns the collection of breadcrumb items.
  • get_value—Returns the value of the Breadcrumb.
  • set_value—Sets the value of the Breadcrumb.
  • repaint—Repaints the control.

You can find the full client-side API of the control in the RadBreadcrumb Client-side API documentation article.


Get Client-side Object Reference to the Kendo Breadcrumb widget in order to use its API

There are two ways to get a reference to the Kendo Breadcrumb widget in order to use its API:

  • Use the get_kendoWidget method the RadBreadcrumb client-side object exposes. You can get the RadBreadcrumb object through the $find() MS AJAX method:

    var RadBreadcrumbObject  = $find("<%=RadBreadcrumb1.ClientID %>"); //the standard script control object
    var kendoBreadcrumbObject = RadBreadcrumbObject.get_kendoWidget(); //the Kendo widget

  • Use the standard Kendo approach for getting the widget through the data-attributes of the DOM element:

    var kendoBreadcrumbObject = $telerik.$("#<%=RadBreadcrumb1.ClientID %>").data("kendoBreadcrumb"); //the jQuery selector must get the RadBreadcrumb1 select element

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • scripts.js
  • styles.css
<%@ Page Language="vb" AutoEventWireup="true"  CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Breadcrumb.ClientSideAPI.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="scripts.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container" runat="server">
        <telerik:RadBreadcrumb runat="server" ID="RadBreadcrumb1" RootIcon="home">
            <ClientEvents OnLoad="onLoad" />
            <Items>
                <telerik:BreadcrumbItem Type="RootItem" ShowText="true" Text="Telerik UI for ASP.NET AJAX" />
                <telerik:BreadcrumbItem Text="Controls" ShowIcon="true" Icon="folder-open" />
                <telerik:BreadcrumbItem Text="RadBreadcrumb" ShowIcon="true" Icon="folder-open" />
                <telerik:BreadcrumbItem Text="Overview" Icon="star" ShowIcon="true" />
            </Items>
        </telerik:RadBreadcrumb>
        <br />
        <br />
        <telerik:RadButton ID="Button1" runat="server" Text="Refresh Breadcrumb">
            <Icon PrimaryIconCssClass="rbRefresh"></Icon>
        </telerik:RadButton>
    </div>

    <qsf:ConfiguratorPanel runat="server" ID="rpvConfigurationPanel">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn runat="server" Size="Auto" Title="Get/Set Items">
                    <ul class="fb-group">
                        <li>
                            <qsf:Button Width="120" runat="server" ID="btnGet" Text="Get First Item" AutoPostBack="false" OnClientClicked="getItem" />
                            <qsf:Button Width="120" runat="server" ID="btnSetItems" Text="Set Items" AutoPostBack="false" OnClientClicked="setItems" />
                            <qsf:Button Width="120" runat="server" ID="btnSetValue" Text="Set Value" AutoPostBack="false" OnClientClicked="setValue" />
                            <qsf:Button Width="120" runat="server" ID="btnReset" Text="Reset Items" AutoPostBack="false" OnClientClicked="resetItems" />
                        </li>
                    </ul>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance