Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1225
Header Bakcolor
posted

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 If

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