We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to detect the validation of a filter with GridOffice2007Filter?

Thread ID:





95929 Aug 10,2010 03:43 PM UTC Aug 12,2010 04:04 AM UTC WinForms 3
Tags: GridControl
Asked On August 10, 2010 03:43 PM UTC


I am working with a GridGroupingControl and a GridOffice2007Filter.

The filter is associated to the grid, so I have a red icon at corner bottom right of ColHeaders.

Because my GridGroupingControl is large, I would like the user can visually know the ColHeaders which he filtered.

That is why I would like to detect when the button "OK" in my GridOffice2007Filter is pressed, in order to change the backcolor of the ColHeader of the column filtered.

Could you help me please?

Thanks in advance for your future response.



Jisha Joy [Syncfusion]
Replied On August 11, 2010 08:56 AM UTC

Hi Raphael,

You could achieve the desired behavior by handling the RecordFilters.Changed and TableControlPrepareViewStyleInfo events.

this.gridGroupingControl1.TableDescriptor.RecordFilters.Changed += new Syncfusion.Collections.ListPropertyChangedEventHandler(RecordFilters_Changed);
this.gridGroupingControl1.TableControlPrepareViewStyleInfo += new GridTableControlPrepareViewStyleInfoEventHandler(gridGroupingControl1_TableControlPrepareViewStyleInfo);

void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if (style.TableCellIdentity.Column != null && ht.Contains(style.TableCellIdentity.Column.Name)
&& (style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell ))
e.Inner.Style.Themed = false;
e.Inner.Style.BackColor = Color.Red;

Hashtable ht = new Hashtable();
void RecordFilters_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)

RecordFilterDescriptor dex = e.Item as RecordFilterDescriptor;
ht.Add(dex.FieldDescriptor.Name, dex.FieldDescriptor.Name);



Replied On August 11, 2010 12:16 PM UTC


Thank you very much, it works!

Have a nice day.



Jisha Joy [Syncfusion]
Replied On August 12, 2010 04:04 AM UTC

Hi Raphaël,

Thank you for your update.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon