DenysVuika / WPG

WPF PropertyGrid Control
Apache License 2.0
101 stars 47 forks source link

Value validation #14

Open czpeet opened 13 years ago

czpeet commented 13 years ago

Hello,

first, thanks for this great control, it looks really nice and has really unique and usefull features like extended editors or filtering.

When running sample applications I noticed that it is possible to type non-numeric characters in numeric fields (editors). Additionally when leaving integer/double editor which does contain non-numeric characters nothing happens. I was expecting similar behavior to property grid in Visual Studio - error message is shown and invalid numeric value is reverted.

Is it possible to switch WPG to this mode? Or how can I implement this in my code? Should I create a new editor and assign it to all double/integer properties?

Thank you

Petr

sunbow commented 13 years ago

I opened an equal issue before i have seen this thread here... here is my issue: https://github.com/DenisVuyka/WPG/issues/17

DexterHaslem commented 13 years ago

you may want to take a look at baks' branch where he added IDataErrorInfo support:

https://github.com/baks/WPG/commit/5c12c6c7755b1f68bd1d758a62b5ae681b6a151c