ClientDataSource - Filtering

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

    The demo shows how to filter images by name by typing in a search field using the filter feature of RadClientDataSource. The functionality is achieved by utilizing the filter expression from the Client-side API of the control.

    • DefaultCS.aspx
    • scripts.js
    • styles.css
    <%@ Page Language="C#" AutoEventWireup="true"  %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ 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" />
        <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
            <script type="text/javascript">
                var dataSource;
                var searchBox
                function pageLoad() {
                    searchBox = $get('<%=rtb1.ClientID%>');
                    dataSource = $find('<%= RadClientDataSource1.ClientID %>');
        <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
        <div class="demo-containers">
            <div class="demo-container">
                <script type="text/javascript" src="scripts.js"></script>
                <telerik:RadClientDataSource runat="server" ID="RadClientDataSource1">
                        <WebServiceDataSourceSettings ServiceType="OData">
                            <Select Url="" />
                    <ClientEvents OnChange="dataSourceChange" />
                <div class="demo-section">
                    <div class="searchBox">
                        <telerik:RadTextBox RenderMode="Lightweight" Skin="Silk" runat="server" ID="rtb1" EmptyMessage="Search by Product Name" onkeyup="filterKeyPress(event)" Width="100%"></telerik:RadTextBox>
                        <span class="searchIcon"></span>
                    <ul id="products"></ul>

    Support & Learning Resources

    Find Assistance

    Help Us Improve

    Was this example helpful?