1

Resolved

WPF IDataErrorInfo ignoring columnName

description

And another (small one):
 
When using WPF IDataErrorInfo function returns all errors for all fields (it ignores the owner)
 
public string this[string columnName]
    {
        get
        {
            var message = string.Join(Environment.NewLine,
                                      ((IEntityBase)this).Extensions.BrokenRules.Where(r => r.Severity == BrokenRuleSeverity.Error && r.Owner == columnName)
                                          .Select(r => r.Message).ToArray());
 
            return string.IsNullOrEmpty(message) ? null : message;
        }
    }
 
I just added "&& r.Owner == columnName" and it works now..
(has to be replaced in 4 places)

comments

michaelmac wrote Apr 27, 2012 at 9:05 AM

Corrected.
Thanks for the proposal.

wrote Apr 27, 2012 at 9:06 AM

wrote Feb 13, 2013 at 8:30 PM

wrote May 16, 2013 at 1:43 AM

wrote May 16, 2013 at 1:43 AM

wrote Jun 14, 2013 at 7:15 AM