Tag Archives: Telerik

Fixing the Telerik RadGrid Filter Case Sensitive Issue

By default the filter option for the RadGrid is set to be case-sensitive (true). You can change this on the .aspx page by specifying it tn the declaration of the grid.

GroupingSettings-CaseSensitive="False"
Tagged , ,

Reducing the Filter Menu Options in a Telerik RadGrid

You can reduce the filter menu options to display only a subset of the available filter functions. There are two possible approaches – client-side and server-side. I personally prefer the server-side approach and the following example shows how to reduce the set of filter functions so that the filter menu can only show the NoFilter, Contains, EqualTo, GreaterThan and LessThan items:

Private Sub RadGrid1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.Init
    Dim menu As GridFilterMenu = RadGrid1.FilterMenu
    Dim i As Integer = 0
    While i < menu.Items.Count
        If menu.Items(i).Text = "NoFilter" Or _
           menu.Items(i).Text = "Contains" Or _
           menu.Items(i).Text = "EqualTo" Or _
           menu.Items(i).Text = "GreaterThan" Or _
           menu.Items(i).Text = "LessThan" Then
            i = i + 1
        Else
            menu.Items.RemoveAt(i)
        End If
    End While
End Sub
Tagged ,