views:

246

answers:

0

We're using the PropertyGrid to edit properties on a object and are looking for a means of providing validation. Specifically validation that indicates that the entire object is valid for being saved.

Here's basic idea. Imagine two properties on a object

Property: Widgets (a string collection)
Property: DefaultWidget (a single string, that must exist in the Widgets collection)

Ideally we'd like to have the grid to indicate that DefaultWidget is invalid if it doesn't exist in the Widgets collection.

Also I'd like to know the entire object is invalid so the Save button would be disabled.

So, The question is: How can I provide validation with a PropertyGrid?
with the related question: How can I provide visual feedback of invalid properties?