Hello,
I have a column which I would like to validate with custom validation rule. I've found EventCellValidationRule class in documentation and created a derieved class:
public class AttributeValueValidationRule : EventCellValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo,
CellValidationContext cellValidationContext)
{
//some validation code
}
}
Also I've added this class to column's CellValidationRules collection and created handler for Validating event:
<xcdg:Column FieldName="Value" Title="Value" CellEditor="{x:Static xcdg:CellEditor.TextBoxEditor}">
<xcdg:Column.CellValidationRules>
<local:AttributeValueValidationRule Validating="AttributeValueValidationRule_Validating"/>
</xcdg:Column.CellValidationRules>
</xcdg:Column>
private void AttributeValueValidationRule_Validating(object sender, CellValidatingEventArgs e)
{
//some code here
}
But it seems that Validating event is never raised. Or it does not work this way? Could you please tell me what am I doing wrong?
Thanks,
Igor