StrataFrame Forum

Error provider

http://forum.strataframe.net/Topic228.aspx

By John Frankewicz - 12/3/2005

I was looking at your sample program, for Visual Basic, WindowsForm application.

 I was looking for the ErrorProvider on the form, but haven't had any success locating it on the CustomerMaintenace form. Maybe it's my C# mentality Smile

Could you please explain the mechanism that is used to provide visual indication when an error occurs?

By John Frankewicz - 12/3/2005

After further searching I was in the wrong component, so the Broken Rule properties did not show up.

I think it's fairly intuitive how to use it, but are you coming out with more detailed documentation on the Classes in the framework?

By Trent L. Taylor - 12/3/2005

Be assured that more documentation is going to continue to be released, as well as many more samples and training videos will be available as well. 

As for the error providers, we dynamically create the error providers through code rather than requiring them to be dropped on a form.  You can set all of the properties you would like to see implemented on the error provider, or turn off the "Auto" management and handle the errors yourself. This works the same for C# and VB, there is no difference between the two in this regard.

If you look on the property sheet of a StrataFrame form, you will see a number of ErrorProvider properties that range from the icon to display to the location of the icon when shown under the "StrataFrame: Error Provider Settings" category.  If you want to manage the errors yourself, just set the UseErrorProvider property to False and then you can implement your own error provider.

By StrataFrame Team - 12/4/2005

John, just so you know, when you define a broken rule (through the AddBrokenRule method) the broken rule is added to the business object's BrokenRules collection and the field in the internal DataTable of the business object is set in error, so if you use grids or an error provider that requires the errors to be set on the DataTable, it's already done for you.