This is a migrated thread and some comments may be shown as answers.

Change Filter Icon

3 Answers 312 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Armen
Top achievements
Rank 1
Armen asked on 06 Apr 2012, 09:53 AM
Hi all, I have a little bit strange question :)  Is it possible to change filter icon of the column which is filtered ? 

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Apr 2012, 03:31 PM
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 >>
0
r
Top achievements
Rank 1
answered on 09 Apr 2013, 08:49 AM
Hi ,

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

Kindly help
0
Stefan
Telerik team
answered on 09 Apr 2013, 09:15 AM
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.
Tags
GridView
Asked by
Armen
Top achievements
Rank 1
Answers by
Stefan
Telerik team
r
Top achievements
Rank 1
Share this question
or