RegEx validation on PropertyGrid

Grids for WPF Forum

Posted 1 year ago by Brian Pratt
Version: 17.2.0664
Avatar

I'm having a little trouble understanding how to add RegEx validation to a PropertyGrid property.

 

I have a property called Name, and I want to apply reg-ex validation to it, not allowing commit until the string is valid.

 

How would I go about doing this?

Thanks,

Brian

Comments (2)

Posted 1 year ago by Brian Pratt
Avatar

I think I might have figured it out using a XAML PropertyEditor.ValueTemplate.  I'll post something if it works.

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Brian,

Please check out our PropertyGridDataValidation QuickStart since that shows how you can do some validation.  You can customize it to use regex's in code if you wish.

There also is a "Data Validation" topic in the PropertyGrid documentation that is related.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.