To show/hide properties on a selection changed.

Grids for WPF Forum

Posted 9 years ago by Fatema
Avatar
We have a requirement where there is a drop down property(with eg: red, brown options) in the property grid we want to show/hide properties in the property grid based on the selection value. ie. if user selects red then property1 and property2 along with other default properties should be shown. if user select brown then property1 and property2 should be hidden.

we were able to achieve this using filters but then we need to refresh the property grid selectobject. which gives a weired effect on the UI.

Please suggest

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

Can you please be a bit more specific about the "weird" effect? The DataFilter is only applied when the PropertyGrid is populated, it is not dynamically applied as your filter logic changes. So in order to apply any new logic, the PropertyGrid must be cleared and repopulated (i.e. refreshed). This causes certain pieces of information to be lost, such as the expansion state of nodes, scroll position, or the focused element. You can try to manually save this information before you call refresh, then restore it later.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 8 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.