This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, In my object I have a few properties but some properties are related. For example, there are three boolean property a1, a2 and a3. If user selects a1 to be true, a2 and a3 all have to be true automatically; if user select a1 to be false, then user can select a2 and a3 freely. Can your property do this? Thank you very much. Yang
|
|
|
Changing the properties is the responsibility of your object's business logic, not the grid. For example, in the setter for a1, if a1 is being set to true, the setter should set a2 and a3 to true. Assuming that your object implements INotifyPropertyChanged, the grid will reflect those changes. However, it sounds like you also want to prevent the user from modifying a2 and a3 while a1 is true. For information about how to do this in the WPF Property Grid, see http://www.mindscape.co.nz/forums/Thread.aspx?PostID=2289. |
|