Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
XamDatagrid BindingValidator check whether the grid is valid or not
posted

In my xaml, i use a lot of binding validationRules

<Binding RelativeSource="{RelativeSource TemplatedParent}"
 Path="Content">
 <Binding.ValidationRules>
 <validations:ValidateNotNullOrWhiteSpace
 ValidatesOnTargetUpdated="True" />
 </Binding.ValidationRules>
</Binding>

Now I have a button that launch some calculation and I have a function that show a messagebox if there is validation error in the form.

To check if the form isValid, I use the native BindingValidator and IsValid.


private IBindingValidator _bindingValidator = new BindingValidator();
...
_bindingValidator.IsValid(this)

My problem is that the validation rule of the grid are not working with this and the IsValid function return true.

Is there any way to know if the whole grid is valid with XamDataGrid

Thank you,

Charles