DropDownTree - Server-side Templates

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

RadDropDownTree  provides several templates for easier customization of the dropdown.

Header Template - positioned at the very top of the DropDown it can easily be customized in order to match the desired appearance.

Node Template - you can create a single template that could be applied to all of the nodes in the DropDownTree.

Footer Template - positioned at the very bottom of the dropdown it enables you set your custom footer.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="DropDownTree.Examples.Functionality.Templates.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</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 no-bg size-wide">
        <div class="content">
            <div class="dropdowntreeholder">
                <telerik:RadDropDownTree RenderMode="Lightweight" ID="RadDropDownTree1" runat="server" Width="350px" Skin="Default"
                    DefaultMessage="Please select a person from the list">
                    <DropDownSettings Width="350px" />
                    <HeaderTemplate>
                        <div class="header">
                            <span>Employees </span>
                        </div>
                    </HeaderTemplate>
                    <DropDownNodeTemplate>
                        <div class="nodeTemplate">
                            <span>
                                <%# DataBinder.Eval(Container, "Text") %>
                            </span>
                        </div>
                    </DropDownNodeTemplate>
                    <FooterTemplate>
                        <div class="footer">
                            <span>End of list</span>
                        </div>
                    </FooterTemplate>
                </telerik:RadDropDownTree>
            </div>
        </div>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?