Triggering Validation on initial loading of custom editor

Grids for WPF Forum

Posted 4 years ago by James Carter
Version: 13.2.0059
Avatar

Hey,

We currently use the property grid with custom data accessors (implementing IDataErrorInfo). It appears your standard editors validate on load, however we have not been able to easily get this functionality working in our custom editors.

What functionality are you using within your editors to get this working?

Comments (1)

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

I don't believe we do too much behind the scenes related to IDataErrorInfo.  If the target of a property data accessor is an IDataErrorInfo, it will publish IDataErrorInfo up into the property editor UI by having PropertyGridDataAccessorItem also implement IDataErrorInfo and "wrap" the IDataErrorInfo properties returned by the target.

Then many of our property editors have the Validation.ErrorTemplate="{StaticResource PropertyGridTextBoxErrorTemplate}" set within the DataTemplate somewhere.  The Data Validation QuickStart also shows how to make a custom error validation template.

Everything else that is going on related to IDataErrorInfo is pretty much native WPF code.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.