event FilterChange ()
Occurs when filter was changed.

 TypeDescription 

Use the FilterChange event to notify your application that the control's filter is changed. Use the Filter and FilterType properties to retrieve the column's filter string, if case, and the column's filter type. The ApplyFilter and ClearFilter methods fire the FilterChange event. Use the DisplayFilterButton property to add a filter bar button to the column's caption. Use the FilterBarHeight property to specify the height of the control's filter bar. Use the FilterBarFont property to specify the font for the control's filter bar.

When I select an item in the filterlist on a column, it applies that filter to the grid - magic. When I select another value, it adds that value to the first one selected and my column is now filtered for both those values. By default, the filter strings are cumulative. You can replace the selection in the drop down filter window, by resetting the FilterType property of the Column object, during the FilterChange event, like in the following VB sample:

Private Sub Grid1_FilterChange()
    Dim c As EXGRIDLibCtl.Column
    With Grid1
        For Each c In .Columns
            c.FilterType = exAll
        Next
        .FilterBarCaption = "new filter"
    End With
End Sub 

The sample changes the FilterType property to exAll, so next time when the user opens the drop down filter window, the 'All Items' filter option is selected, so user can select a new items from the drop down filter window, without filtering with two or more values. Use the FilterBarCaption property to change the caption of the filterbar

 


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.