wpf - DataGridTextColumn ValidationRules doesn't trigger Validation.HasErrorProperty -
i have datagrid
datagridtextcolumn
on have validationrule
<datagridtextcolumn header="xxx" isreadonly="false"> <datagridtextcolumn.binding> <binding path="xxx" > <binding.validationrules> <v:xxxvalidator /> </binding.validationrules> </binding> </datagridtextcolumn.binding>
i have b:bindvalidationresult.haserror="{binding haserror}"
on datagrid
.
in bindvalidationresult
use validation.haserrorproperty
listen on validationerror changed.
my validation rule return return new validationresult(false, "");
my feeling don't listen on right property datagridtextcolumn
because if same thing textbox
works charm.
also, datagridcell
red border when there error know there happening.
i tried see if validation.haserror
change doesn't trigger.
<style.triggers> <trigger property="validation.haserror" value="true"> <setter property="tooltip" value="{binding relativesource={relativesource self}, path=(validation.errors)[0].errorcontent}"/> </trigger> </style.triggers>
any appreciated on how fix or how attack problem.
thanks