Customize filtering row

4 posts, 1 answers
  1. Skurken
    Skurken avatar
    1 posts
    Member since:
    Aug 2006

    Posted 28 Jan 2011 Link to this post

    Hi there guys

    I'm trying to customize the filtering row in a Winform Telerik Grid. What I want is to hide the Filter Icon and only show the text boxes. When a user enteres text in the text box it should apply the "Contains" filter on the column.

    I have been using Telerik ASP Net. Radgrid quite a lot and could set the "ShowFilterIcon=false" and on the gridboundcolumn and "AutoPostBackOnFilter=true" to get the desired functionality.

    Any hints?
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 28 Jan 2011 Link to this post

    Hello,

    In order to hide the filter icon in the grid, you'll need to subscribe to the ViewCellFormatting event. This can be done in the following way:

    this.radGridView1.ViewCellFormatting += new CellFormattingEventHandler(radGridView1_ViewCellFormatting);

    void radGridView1_ViewCellFormatting(Object sender, CellFormattingEventArgs e)
    {
        if (e.CellElement is GridFilterCellElement)
        {
            GridFilterCellElement cell = (GridFilterCellElement)e.CellElement;
            cell.FilterButton.Image = null;
        }
          
    }

    You can learn about setting filters programatically at this documentation link
    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Skurken
    Skurken avatar
    1 posts
    Member since:
    Aug 2006

    Posted 03 Feb 2011 Link to this post

    Thanks for the reply Richard!
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 03 Feb 2011 Link to this post

    You're welcome. Glad I could help
    Richard
Back to Top