DataObject validation

Apr 9, 2010 at 10:00 AM


you wrote in the dotnetpro article 4/2010, that validation rules can be applied on DataObjectLists and DataObjects. But the ValidationRules property in the DataObject class is internal.

How to validate single DataObjects through ValidationRule objects? For me it is not possible to hard-code the validation rules in the business objects, because the validation rules are declared in configuration files, and will be applied on runtime to the objects.

Changing the property from internal to public creates an separate Band in an UltraWinGrid (Infragistics) when binding to a DataObjectList. This also causes some strange exceptions.

Apr 11, 2010 at 1:52 PM

Download the current release (v0.11). 

I've added the DataObject.GetValidationRules() method to get access to the validation rules. With it you can add your rules to the returned list.