Example, i used the wizard and then just “changed” the ControlSetting that was passed in
private void CreateRowRuleSalesTerCompanyEquals_Constant_CompanyID()
{
// Description: dsf
// **** begin autogenerated code ****
//Create a custom control setting
ControlSettings myCustomSetting = new ControlSettings();
//Set it orange
myCustomSetting.BackColor=System.Drawing.Color.Orange;
//Assing it to the RowRule
RuleAction epireadonlySalesTer_Comment = RuleAction.AddControlSettings(this.oTrans, "SalesTer.Comment", myCustomSetting);
RuleAction[] ruleActions = new RuleAction[] {
epireadonlySalesTer_Comment};
// Create RowRule and add to the EpiDataView.
RowRule rrCreateRowRuleSalesTerCompanyEquals_Constant_CompanyID = new RowRule("SalesTer.Company", RuleCondition.Equals, "Constant: CompanyID", ruleActions);
((EpiDataView)(this.oTrans.EpiDataViews["SalesTer"])).AddRowRule(rrCreateRowRuleSalesTerCompanyEquals_Constant_CompanyID);
// **** end autogenerated code ****
}