vb.net - Databound ErrorProvider not blinking -
i have error provider on form has datasource bound collection of errors in record class:
the validation working expect, red blinking icon not appear next form controls. record implements idataerrorinfo:
public readonly property [error] string implements idataerrorinfo.error if _errors.count > 0 return string.format("the record cannot saved because there {0} errors", _errors.count) else return string.empty end if end end property ''' <summary> ''' gets error message property given name ''' </summary> ''' <value></value> ''' <returns></returns> default public readonly property propertyerror(fieldname string) string implements idataerrorinfo.item if _errors.containskey(fieldname) return _errors(fieldname).tostring else return string.empty end if end end property
any thoughts appreciated i'm stuck.
the problem caused adding errors collection using control names e.g. staticbalancesoosreasonvalue" , trying retrieve them idataerrorinfo.propertyerror method using property names e.g. "staticbalancesoosreason". that's fixed icons display.
Comments
Post a Comment