BCGSoft > Products > Product feature tour

Product feature tour

Context | First | Prev | Next | Last
Fully implemented BCGControlBar Pro (MFC)
Fully implemented BCGSuite (MFC)
Fully implemented BCGControlBar (Microsoft .NET)

Grid Filter Support

Built-in Filter Support You can add a callback function and implement any custom filter.
Sample code:
LRESULT CALLBACK FilterCallback (WPARAM wParam, LPARAM lParam)
{
    CBCGPGridRow* pRow = (CBCGPGridRow*) wParam;
    ASSERT_VALID (pRow);

    if (pRow->IsGroup ())
    {
        return FALSE; // do not hide groups
    }

    CBCGPGridItem* pItem = pRow->GetItem (pParam->nCol);
    if (pItem == NULL)
    {
        return FALSE;
    }

    // If pRow value is "out of filter", don't show it:
    if (FilteredOut (pRow))
    {
        return TRUE
    }

    return FALSE;
}

CBCGPGridCtrl m_wndGrid;
m_wndGrid.EnableFilter (FilterCallback, 0 /* LPARAM */); 
Prev  Next