This example illustrates how to define validation rules on Model Level by using the attached property.
Note
ValidationStep and ValidatesOnTargetUpdated are not working because the Grid validation mechanism is used and validation is performed by the used current Culture.
Question Comments
Added By: Andrew Sumido at: 1/9/2013 2:22:59 PM
Could we get a working sample of this?
Added By: Jason Atkins 1 at: 12/22/2014 8:27:03 AMThanks. I managed to find this solution a few hours ago after a lot of Googling :) My other ticket raised today is still a problem. I cannot disable a button when the GridControl has errors. Any suggestion would be appreciated. I am using MVVM so not not handling events. I am using Style Trigger on the button which looks at the Validation.HasError property on the GridControl. I also tride the HasValidationError property. Neither properties seem to be getting set when a ValiddationRule fails on a GridColumn. So I can not diable my SaveChanges button when there is a validation error.
Added By: Ilya (DevExpress Support) at: 12/22/2014 11:52:47 AM Hi Jason,Is it the WPF GridControl - How to disable a button when the GridControl has a validation error ticket? If so, it is in our support queue and our specialists are working on it. Please give us some time. We will answer you there.