Refresh PropertyGrid in MVVM application

Grids for WPF Forum

Posted 5 years ago by Arkadiusz Piznal
Version: 14.1.0602
Avatar

Hi,

I have an application that use property grid and MVVM. After changing the values ​​of certain fields should change the number of fields in the property grid (adding new fields, removing unnecessary). I change the fields in object that is in the collection PropertyGrid.SelectedObjects. How can I force property grid to refresh from view model ?

Comments (3)

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

Hello,

You could call the PropertyGrid.Refresh() method or you could set the SelectedObjects to a new collection.  If you are just modifying the existing collection then perhaps calling Refresh is best.


Actipro Software Support

Posted 5 years ago by Arkadiusz Piznal
Avatar

Hi,

from ViewModel I don't have a access to PropertyGrid.Refresh() method, so only way to do this is set SelectedObjects to a new collection ?

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

Hello,

Yes you would probably need to set that property again then.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 15 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.