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 » CExtPropertyGridCtrl and OnPgcInputComplete Collapse All
Subject Author Date
D. Cameron DeHeer Dec 6, 2007 - 11:12 AM

Sorry if this is covered elsewhere but I searched the forums and didn’t see anything similar to what I am trying to do.

I have a CExtPropertyGridCtrl subclass that responds to OnPgcInputComplete, and based on the incoming property being changed I may want to change other properties that are related. Here’s a code example that attempts to change the size value of a field when the data type is changed:

CExtPropertyValue *pPropertyValue = DYNAMIC_DOWNCAST(
CTableFieldPropertyStore *pPropertyStore = DYNAMIC_DOWNCAST(
if (pPropertyValue &&
    CExtSafeString strPropertyName = pPropertyValue->NameGet();
    field = pPropertyStore->GetField();
    if (strPropertyName == "Data Type")
     CExtGridCellComboBox *pCellDataType = STATIC_DOWNCAST(
     CExtGridCellUpDown *pCellSize = STATIC_DOWNCAST(

The effect of the pCellSize->_VariantAssign is to make the value in the grid go bold, as if it has changed, but the displayed text value does not change. For example, if I change the data type to an unsigned long int, and set the new size accordingly to 4, the existing value in the field goes bold but does not change to 4. Selecting a different item in the grid control combo box and re-selecting the changed item does update the displayed value. Any ideas what I’m doing wrong here? Thanks in advance for any help...

Technical Support Dec 6, 2007 - 12:44 PM

The direct access to property values inside a property grid control with grid cell modification is described here.