Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » property grid categories sort order Collapse All
Subject Author Date
Denis Konovalov Mar 23, 2007 - 9:21 AM


I use categorized property grid control. But categories are always in alphabetical order. How can i specify my own categories order?

Technical Support Mar 23, 2007 - 2:19 PM

You can achieve this using the following approach:

1) Use the following code before assigning a property store to the property grid control:

CExtPropertyGridCtrl * pPGC = . . .
CExtPropertyGridWnd * pPGW =
    STATIC_DOWNCAST( CExtPropertyGridWnd,
        pPGC->GetChildByRTC( RUNTIME_CLASS( CExtPropertyGridWndCategorized ) ) );
    pPGW->m_bSortedCategories = false;
2) Insert your property values and property categories into each sublevel of the property tree using the same order which you want to see on the screen. The previous step turns off any sorting in the property grid.