Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » CExtPropertyGridCtrl disable specific properties within a CExtPropertyStore Collapse All
Subject Author Date
Nicholas Vezirgiannis Jan 30, 2008 - 2:02 AM

Hallo,
I Have a class derived from CExtPropertyGridCtrl as follows:
class DataEntryGrid : public CExtPPVW < CExtPropertyGridCtrl >
I also have derived classes for the cells of the property grid.

I dynamically attach property stores on it with properties I create on runtime depending on the type of data I have.
Basically I would like to enable or disable properties during runtime depending on the values of other properties the user changes.

I would like to know if there is a way to disable a property so that it appears grayed and the user cannot enter any data.
Thanks in advance.

Nicholas Vezirgiannis Feb 4, 2008 - 3:49 AM

Thank you very much.
All this was most helpful.

Technical Support Feb 2, 2008 - 11:21 AM

The CExtPropertyGridCtrl class does not support print/preview. The CExtPPVW < CExtPropertyGridCtrl > template based class does. You should simply remove the CExtPPVW template from declaration of the property grid control in your project.

Nicholas Vezirgiannis Feb 1, 2008 - 4:27 AM

Thank you for your quick responce.
I have one more question.
The CExtPropertyGridCtrl also has the print and print preview buttons on it. Because it seems rather confusing for the user, is there a way to hide them or disable them?

Technical Support Jan 31, 2008 - 4:25 AM

The disabled state is not supported in the grid cells, but the read-only state is supported. You can apply it to a cell by using CExtGridCell::ModifyStyle() in which __EGCS_READ_ONLY is passed in the first parameter. You can use CExtPropertyGridCtrl::PropertyStoreSynchronize() to reload a property grid control. Please note a CExtPropertyGridCtrl control contains one or more tree grid windows inside. By default, it contains two tree grids: CExtPropertyGridWndCategorized and CExtPropertyGridWndSorted. Each of tree grids contains copies of active grid cells of each property value in the property store. It’s possible to access tree grids and change appropriate grid cells in them but this is not reasonable if you are using combined property stores.