broken rule


Author
Message
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)
Group: Forum Members
Posts: 153, Visits: 462
I have a form where a column by default for a form should always be disabled for a certain user unless there is a broken rule on that column.  The broken rule logic is in the BO in the CheckRulesOnCurrentRow. Right now when the user click EDIT, certain columns should always be disabled unless there is a broken rule.

My issue is how do I enable a column on the form IF that column has a broken rule and the return the column enable.not enabled back to what it was after the user clicks SAVE.

The BO may be used from multiple forms so trying to hanle setting a column on a form for a broken rule will probably need to be done from the form. So how do I intercept this on a column when the form shows the red error pointing to the column and make the column enabled?

 
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
You might try adding a boolean property to the BO (not a custom bindable one, just a regular .NET one) that you set in the broke rule event handler of the BO. Normally you just setup UI related stuff for the user, so they know what's wrong and how to fix it. However, in your case, if a certain column is broken (and maybe only in a certain way) you need to take other action, so set this new property to true.  In the AfterSave event of the BO, clear it.  Now the BO is providing information about the issue. You'll use events to test this property and take the appropriate action.

Then on the form, you'd need to do three things, all to handle the enabled state of your column manually.
  1. Set the IgnoreManageUIReadonlyState of the control displaying this column to true. This tells the BO to NOT enable/disable the control automatically.
  2. Handle the BusinessRulesChecked event of the BO on the form. Check the boolean property mentioned above and set enabled accordingly.
  3. Handle the AfterSave event of the BO on the form and disable the column.
That should get you going in the right direction.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search