SearchBox - Binding to Telerik ClientDataSource

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

Since Q2 2014 the RadSearchBox can be bound to RadClientDataSource control. This functionality is provided out of the box through the server-side ClientDataSourceID property.

RadSearchBox needs the following properties in order to load its items properly:

  • DataText—defines the data source field name which will be shown as text of the item.
  • DataValue—defines the data source field name which will be considered as value of the item.

The RadSearchBox properties MinFilterLength and MaxResultCount work in exactly the same manner as with any other data source control.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Title="" Language="C#"  AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="SearchBox_Examples_Client_Side_Data_Binding_DefaultCS" %>

<%@ 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>
    <link href="styles.css" rel="stylesheet" type="text/css" />
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadClientDataSource runat="server" ID="RadClientDataSource1">
            <WebServiceDataSourceSettings ServiceType="OData">
                <Select Url="Products" DataType="JSON" />
        <Schema DataName="d.results">

    <div class="demo-container size-thin">
        <telerik:RadSearchBox RenderMode="Lightweight" ID="RadSearchBox1" runat="server" DataTextField="ProductName" DataValueField="ProductID" ClientDataSourceID="RadClientDataSource1"
            MaxResultCount="10" DropDownSettings-Height="200px" Width="300">

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?