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

Web Service Binding

Web Service Binding

Since Q2 2013 the RadDropDownTree control supports web service binding (WCF and ASMX). By using the Databindings settings of the RadDropDownTree control you can set the ExpandMode property to WebService. You will also need to set the path to the Web service and the name of the service method as specified in the WebServiceSettings' Path and Method properties below:

<telerik:RadDropDownTree RenderMode="Lightweight" ID="RadDropDownTree1" runat="server" DataSourceID="LinqDataSource1"
    DataTextField="Text" DataValueField="id" Width="280px">
        <telerik:DropDownNodeBinding Depth="0" ExpandMode="WebService" />
    <webservicesettings path="DropDownTreeWebService.svc" method="LoadData"></webservicesettings>
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class DropDownTreeWebService

    public DropDownNodeData[] LoadData(DropDownNodeData node)
        TelerikSamplesDataContext context = new TelerikSamplesDataContext();

        var result = from link in context.Links
                     where link.parentId == Convert.ToInt32(node.Value)
                     let children = from child in context.Links
                                    where child.parentId ==
                                    select child
                     select new DropDownNodeData
                         Text = link.Text,
                         ExpandMode = children.Count() > 0 ? DropDownTreeNodeExpandMode.WebService : DropDownTreeNodeExpandMode.ClientSide,
                         Value =

        return result.ToArray();
In this article