My row Rule is not working not sure why. Can any one point this out to me.
private void CreateRowRuleQuoteHedLeadSource_cNotEqual___()
{
// Description: LeadSourceBlank
//New Control Setting
ControlSettings myCustomSetting = new ControlSettings();
//SetColor
myCustomSetting.BackColor = System.Drawing.Color.DeepPink;
// **** begin autogenerated code ****
ControlSettings controlSettings1EpiReadOnly = new ControlSettings();
controlSettings1EpiReadOnly.SetStyleSetName("EpiReadOnly");
RuleAction epireadonlyQuoteHed_LeadSource_c = RuleAction.AddControlSettings(this.oTrans, "QuoteHed.LeadSource_c", myCustomSetting);
RuleAction[] ruleActions = new RuleAction[] {
epireadonlyQuoteHed_LeadSource_c};
// Create RowRule and add to the EpiDataView.
RowRule rrCreateRowRuleQuoteHedLeadSource_cNotEqual___ = new RowRule("QuoteHed.LeadSource_c", RuleCondition.NotEqual,"", ruleActions);
((EpiDataView)(this.oTrans.EpiDataViews["QuoteHed"])).AddRowRule(rrCreateRowRuleQuoteHedLeadSource_cNotEqual___);
// **** end autogenerated code ****
}
jkane
(John Kane)
2
Try this. You will need to delete your current row rule completely on the Wizard tab and then add the below.
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
CRRQuoteHedLeadSource();;
// End Wizard Added Custom Method Calls
}
private void CRRQuoteHedLeadSource()
{
ControlSettings myCustomSetting = new ControlSettings.GetControlSettings(SettingStyle.ReadOnly);
myCustomSetting.IsReadOnly = false;
myCustomSetting.BackColor = System.Drawing.Color.DeepPink;
RuleAction epireadonlyQuoteHed_LeadSource_c = RuleAction.AddControlSettings(this.oTrans, "QuoteHed.LeadSource_c", false, myCustomSetting);
RuleAction[] ruleActions = new RuleAction[] {
epireadonlyQuoteHed_LeadSource_c};
RowRule rrCreateRowRuleQuoteHedLeadSource_cNotEqual___ = new RowRule("QuoteHed.LeadSource_c", RuleCondition.NotEqual,"", ruleActions);
((EpiDataView)(this.oTrans.EpiDataViews["QuoteHed"])).AddRowRule(rrCreateRowRuleQuoteHedLeadSource_cNotEqual___);
}
still not working if this a EpiCombo box would that make any difference than a textbox.