Change Filter Icon

4 posts, 0 answers
  1. Armen
    Armen avatar
    5 posts
    Member since:
    Jul 2011

    Posted 06 Apr 2012 Link to this post

    Hi all, I have a little bit strange question :)  Is it possible to change filter icon of the column which is filtered ? 
  2. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 10 Apr 2012 Link to this post

    Hello Armen,

    Thank you for writing.

    You can do that by using the ViewCellFormatting event of RadGridView. Attached you can find a sample application demonstrating how to achieve the desired behavior.

    More information regarding this event can be found here:http://www.telerik.com/help/winforms/gridview-cells-formatting-cells.html.

    I hope that you find this information useful.
     
    All the best,
    Stefan
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. r
    r avatar
    9 posts
    Member since:
    Oct 2008

    Posted 09 Apr 2013 Link to this post

    Hi ,

    How to change size of filter icon if filtering row is not shown.
         Me.GridView.MasterTemplate.ShowFilteringRow = False

    Kindly help
  4. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 09 Apr 2013 Link to this post

    Hi,

    Thank you for writing.

    I assume that you are asking about the filter button located in the grid's header cells, since the one located in the filtering cell will not be visible when you hide the row. To increase the size of the button image, just set an image with the desired size in the ViewCellFormatting event:
    void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
    {
        GridHeaderCellElement headerCell = e.CellElement as GridHeaderCellElement;
        if (headerCell != null)
        {
            headerCell.FilterButton.Image = Image.FromFile(@"C:\Documents\32x32\New.png");
        }
    }

    I hope this helps.
     
    Kind regards,
    Stefan
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Back to Top