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

Excel Like Filtering

3 Answers 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adrian Loughman
Top achievements
Rank 1
Adrian Loughman asked on 15 Jul 2015, 02:15 PM

Hi All

 I am wondering if there is a way of changing the filtering to look more like the current version/s of excel.

The file grid.jpg is what the radgrid gives me, whereas the excel.jpg shows how to select multiple months, and select key ranges (this month, last month, between, etc).

 

Would i be able to replicate this with the gridview?

 

Also how can i change the filter logos so they are more visible when a column has a filter applied?

 

Ade

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Jul 2015, 03:06 PM
Hello Adrian,

Thank you for writing.

You can use the RadGridView.FilterPopupRequired event and specify the FilterPopupRequiredEventArgs.FilterPopup property. The FilterPopupRequired event is thrown just before filter pop up showing. It gives access to the current filter pop up through FilterPopup argument and also allows setting up any custom made pop up, which implements IGridFilterPopup interface. In order to show date values grouped by year and month in a list you can show a RadListFilterPopup:
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
        this.radGridView1.EnableFiltering = true;
        this.radGridView1.ShowHeaderCellButtons = true;
        this.radGridView1.FilterPopupRequired+=radGridView1_FilterPopupRequired;
    }
 
    private void radGridView1_FilterPopupRequired(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e)
    {
        if (e.Column.Name == "OrderDate")
        {
            e.FilterPopup = new Telerik.WinControls.UI.RadListFilterPopup(e.Column, true);
        }
    }

Please refer to the Excel-like filtering help article >> Customizing Excel-like filtering popup section. 

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Martin
Top achievements
Rank 1
Veteran
answered on 24 Jun 2020, 12:53 PM
Has the FilterPopupRequired event been removed recently? Because I can't seem to find it for my RadGridView in WPF
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Jun 2020, 12:58 PM

Hello, Martin,

I would like to note that this forum is related to RadGridView from the Telerik UI for WinForms suite. Hence, the provided solution is valid for the WinForms product.

If you have any technical questions regarding WPF, feel free to post in the relevant forum and thus the appropriate community would gladly assist you: https://www.telerik.com/forums 

Thank you for your understanding.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
GridView
Asked by
Adrian Loughman
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Martin
Top achievements
Rank 1
Veteran
Share this question
or