StrataFrame Forum

Broken Rules when control is not visiable

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

By Leonard P. - 9/16/2008

Hi,



I have a situation where there are broken "required field" rules on the form. But the controls with errors are not visible, because those controls are part of nonactive tab. So, even though users do get "Broken Rules" notification, they can't see error message next to the controls where their attention is required.

Short of redesigning a form and getting rid of tabs, Do you have any suggestions on how to deal with this scenario?
By Ivan George Borges - 9/16/2008

Hi Leonard.

Have a look at the posts started here:

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

By Trent L. Taylor - 9/17/2008

This is soemthing that we plumbed into our BaseForm within our medical software.  Liek the forum that Ivan pointed you to, when you select a broken rule, it will auto-nativate to any tab, parent control, etc. and set the focus to that control.

This really isn't that hard.  Just create a recursive method to which you can pass a control and then it ensures that all parent controls are active.  You may have to take certain control types into special consideration (i.e. a PanelManager) to make sure that they get activated correctly.  But this should be logic that you right one time in your base form (or a shared or static class somewhere that you can pass this over as well).

By Leonard P. - 9/18/2008

Thanks for your reply everyone.

In case someone else is looking for similar solutions, I'd like to share another idea:

Call .CheckRules when user makes a control with broken rules not visible (e.g. user changes tabs) . If broken rules exist for a specific BO, display an InfoBox notification with broken rules. This way user is informed of broken rules as he clicks through the tabs. I just implemented this, it looks good and it's user friendly.

Thanks.

By Trent L. Taylor - 9/18/2008

Glad you found a solution to meet your needs. Smile