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

Server-side Events

  • Fuller
Event log

RadDropDownTree introduces the following server-side events for working with entries:

  • EntryAdded occurs when the user clicks/checks one of the tree nodes and closes the drop down
  • EntryRemoved occurs when the user clicks/unchecks one of the tree nodes and closes the drop down. In single selection there should be already added entry.

This example shows how the EntryAdded and the EntryRemoved events can be wired up.

Please review the source code of this example for additional details. Keep in mind that AutoPostBack property should be set to True.

  1. Select a DropDownNode and close the drop down to trigger the EntryAdded event
  2. Select another DropDownNode and close the drop down to trigger the EntryRemoved event
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="DropDownTree.Examples.Programming.ServerSide.DefaultVB" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <div class="demo-container size-thin">
            <telerik:RadDropDownTree RenderMode="Lightweight" ID="RadDropDownTree1" runat="server" AutoPostBack="true" Width="300px"
                OnEntryAdded="RadDropDownTree1_EntryAdded" OnEntryRemoved="RadDropDownTree1_EntryRemoved"
                DataFieldID="EmployeeID" DataFieldParentID="ReportsTo" DataTextField="LastName"
                DataSourceID="SqlDataSource1" DefaultMessage="Please select">
             </telerik:RadDropDownTree>
            <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                SelectCommand="SELECT * From Employees"></asp:SqlDataSource>
        </div>
        <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true" />
    </telerik:RadAjaxPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance