Sorry to drag up an old thread. What the parser is looking for is a style that’s in the form like SettingStyle.Warning
.
What I did was wrap the custom settings in a class, so when I use it like RowRuleSettings.Style
I don’t get those annoying popups.
public class MockRuleSettings
{
public ControlSettings Style { get { return _style;} }
private ControlSettings _style;
public MockRuleSettings(ControlSettings controlSettings)
{
_style= controlSettings;
}
}
Then in my Row Rule definition I use it like this:
private void CreateRowRuleOrderDtlShortChar07Equals_B()
{
// Description: NonStock
ControlSettings myCustomSetting = new ControlSettings();
myCustomSetting.BackColor=System.Drawing.Color.Blue;
myCustomSetting.ForeColor=System.Drawing.Color.White;
MockRuleSettings RowRuleSettings = new MockRuleSettings(myCustomSetting);
// **** begin autogenerated code ****
RuleAction warningOrderDtl_RowAction = RuleAction.AddRowSettings(this.oTrans, "OrderDtl", true, RowRuleSettings.Style);
RuleAction[] ruleActions = new RuleAction[] {
warningOrderDtl_RowAction};
// Create RowRule and add to the EpiDataView.
RowRule rrCreateRowRuleOrderDtlShortChar07Equals_B = new RowRule("OrderDtl.ShortChar07", RuleCondition.Equals, "B", ruleActions);
((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"])).AddRowRule(rrCreateRowRuleOrderDtlShortChar07Equals_B);
// **** end autogenerated code ****
}
The annoying box is gone now.