BCGControlBar Pro for MFC
void CBCGPGridCtrl::EnableFilterBar ( BOOL  bEnable,
LPCTSTR  lpszPrompt,
BOOL  bCaseSensitive = FALSE,
const CList< int, int > *  pListOfColumnIndexes = NULL,
BOOL  bUpdate = TRUE,
COLORREF  clrMarkBackground = CLR_NONE,
const CBCGPEditColors colors = CBCGPEditColors(),
BOOL  bIncludeGroups = FALSE 

Enables or disables "filter bar" mode.

Call this method to enable or disable the "filter bar" mode. In this mode the grid control displays an edit control under headers of specified columns. The grid data is filtered as the user types in the edit. The cumulative filter is applied to the whole grid data.

If you don't specify the list of column indexes (pListOfColumnIndexes is NULL), the filter will be enabled for all columns in the grid. If you wish to enable filter boxes under specific columns, you need to create a CList <int, int> object and fill it with zero-based indexes of columns to display filter boxes. Also you can call the EnableColumnFilterEdit() method to display or hide filter boxes for specific columns individually.

If you wish to customize the filter box edit control, override OnCreateFilterBarCtrl() and return a pointer to your custom control. The custom control must call OnFilterBarChanged() in order to notify that the filter for specified column has changed.

bEnableSpecifies whether the "filter bar" mode should be enabled or disabled.
lpszPromptSpecifies a text string to be displayed as a prompt in empty filter edit boxes.
bCaseSensitiveTells whether the filter is case sensitive or not.
pListOfColumnIndexesContains a list of indexes of columns to display filter boxes. If this parameter is NULL, filter boxes will be displayed under all column headers.
bUpdateSpecifies whether update the filter bar content.
clrMarkBackgroundSpecifies highlighted (marked) text background color.
clrMarkTextSpecifies highlighted (marked) text foreground color.
colorsSpecifies filter bar edit control colors.
bIncludeGroupsSpecifies whether groups (items with sub-items) should be included in the filtering results.