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

Working With Items And Expressions

(OrderDate = '4/20/2024 12:00:00 AM' AND (ShipCountry = 'Bulgaria' OR ShipCountry = 'Germany'))
  • And
  • Or
  • Not And
  • Not Or
  • Contains
  • DoesNotContain
  • StartsWith
  • EndsWith
  • EqualTo
  • NotEqualTo
  • GreaterThan
  • LessThan
  • GreaterThanOrEqualTo
  • LessThanOrEqualTo
  • Between
  • NotBetween
  • IsEmpty
  • NotIsEmpty
  • IsNull
  • NotIsNull
  • ShipCountry
  • OrderDate

Order DateShip Country
4/20/2024 2:00:00 AMBulgaria
4/20/2024 11:00:00 AMGermany

This demo demonstrates how you could subscribe to RadFilter ExpressionItemCreated event and access and manipulate individual items.

Additionally, a time independent filtering functionality is shown by using the RadFilterQueryProvider.OnExpressionEvaluated delegate where the every EqualTo and NotEqualTo filter functions are swapped for Between and NotBetween so they could filter for the entire day and not for a specific hour, minute, second.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.FilterExamplesCSharp.CustomizingRadFilter.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
  <div class="demo-container">
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
      <telerik:RadFilter RenderMode="Lightweight" runat="server" ID="RadFilter1"
          <telerik:RadFilterDropDownEditor FieldName="ShipCountry" DataTextField="ShipCountry"
            DataValueField="ShipCountry" />
          <telerik:RadFilterDateFieldEditor FieldName="OrderDate" PickerType="DatePicker" />
      <br />
        <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" AllowPaging="true" AllowSorting="true" PageSize="5"
          runat="server" EnableLinqExpressions="false" OnNeedDataSource="RadGrid1_NeedDataSource">

Support & Learning Resources

Find Assistance