Triggering Validation on initial loading of custom editor

Grids for WPF Forum

Posted 8 years ago by James Carter
Version: 13.2.59


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 8 years ago by Actipro Software Support - Cleveland, OH, USA

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 (v22.1.4) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.