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
20
UltraValidator and Binding to a business object
posted

I'm setting up binding on my controls, we are heavily using Infragistics controls and it looks to me like the UltraValidator is the 'infragistics version' of the ErrorProvider.

Is this a correct assumption?

So assuming it is correct, which property is equivalent to errorProvider.DataSource?

What I want is to bind my biz object (which implements IDataErrorInfo) property to a control like this (familyName is an UltraTextEditor):

familyName.DataBindings.Add(new Binding("Text", bizObject, "FamilyName"));

Then set the 'DataSource' equivalent on the UltraValidator so when my biz object gets validated the Validator shows my error message. Eg if I do this with a standard ErrorProvider:

errorProvider.DataSource = bizObject;

then the provider appears if the property doesn't validate (logic in the biz object class).

Is this possible with the UltraValidator or do I have to use the out of the box ErrorProvider?

Thanks :-)

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    UltraValidator is the closest thing we have to the ErrorProvider component, but it is not a drop-in replacement, and does not support validation of a data source. Frankly I'm not familiar with how the ErrorProvider works in conjunction with a data source, but you can hook UltraValidator up to the UltraTextEditor and have it validate changes to (for example) the Text property. It can be configured to notify the user of the error with a MessageBox, image, ballon tip, or just a sound.

Children
No Data