I want to have a visible indication for the users when a filter is active and I am handling the AfterRowFilterChanged event with this procedure.
Private Sub TradeUltraGrid_AfterRowFilterChanged(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs) Handles TradeUltraGrid.AfterRowFilterChanged
Dim FilteredFlag As Boolean = False
For Each colFilter As ColumnFilter In TradeUltraGrid.DisplayLayout.Bands(0).ColumnFilters
If colFilter.FilterConditions.Count > 0 Then
FilteredFlag = True
Exit For
End If
Next
If FilteredFlag Then
TradeUltraGrid.DisplayLayout.Override.FilterRowAppearance.BackColor = Color.Cornsilk
Else
TradeUltraGrid.DisplayLayout.Override.FilterRowAppearance.BackColor = Color.White
End Sub
The grid is using FilterRow as the UI.
I would also like to set the color of the Column Header to a diffrent color for each column being filtered or display the little filter icon in the header. Setting colFilter.Column.Header.Appearance.BackColor after FilteredFlag = true does not make the column header backcolor change. Please let me know how I can do this.
Thanks
HOWTO:Change the Color of Column Headers in the WinGrid