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

Getting filtered values with Excel-like filtering checked list

2 Answers 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
François
Top achievements
Rank 1
François asked on 21 Jun 2017, 12:35 PM

Hello,

I would like to change the css of my filtered columns. I use the following code:

if (e.CommandName == RadGrid.HeaderContextMenuFilterCommandName)
{
Triplet arguments = e.CommandArgument as Triplet;
Pair filter1 = arguments.Second as Pair;
Pair filter2 = arguments.Third as Pair;
GridColumn column = (sender as RadGrid).MasterTableView.GetColumn(arguments.First.ToString());
if (filter1.First.ToString() == "NoFilter" && filter2.First.ToString() == "NoFilter")
column.ItemStyle.CssClass = "";
else
column.ItemStyle.CssClass = "rgFilterClass";
}

 

This works well if I use the two filter fields of the context menu, but if I only choose elements from the filter checked list of my context menu, it's not working. :(

How can I access the "filter checked list" of my "header context menu" from my code-behind? Or is there another way to know that my columns are filtered with the "filter checked list"?

 

Thank you for your help,

    

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 26 Jun 2017, 06:22 AM
Hi François,

You can use the approach demonstrated in the attached web site sample to achieve this requirement.
I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
François
Top achievements
Rank 1
answered on 26 Jun 2017, 12:02 PM
Thank you very much Eyup, it works perfectly!!
Tags
Grid
Asked by
François
Top achievements
Rank 1
Answers by
Eyup
Telerik team
François
Top achievements
Rank 1
Share this question
or