Is there an easy way to create additional “Setting Styles” with custom colors to use in highlighting fields/rows in a dashboard?
Thanks,
Josh
Is there an easy way to create additional “Setting Styles” with custom colors to use in highlighting fields/rows in a dashboard?
Thanks,
Josh
Create the Row Rule within a Customization instead of the Dashboard Assembly, you can then modify the Control Settings accordingly…
private void CreateRowRuleYourDataViewOrderDtl_OrderNumEquals_asdf()
{
// Description: CustomBackColor
ControlSettings myControlSettings = new ControlSettings();
myControlSettings.BackColor = System.Drawing.Color.ForestGreen;
RuleAction DataView_OrderDtl_PartNum = RuleAction.AddControlSettings(this.oTrans, "YourDataView.OrderDtl_PartNum", myControlSettings);
RuleAction[] ruleActions = new RuleAction[] {
DataView_OrderDtl_PartNum};
// Create RowRule and add to the EpiDataView.
RowRule rrCreateRowRuleYourDataViewOrderDtl_OrderNumEquals_asdf = new RowRule("YourDataView.OrderDtl_OrderNum", RuleCondition.Equals, "asdf", ruleActions);
((EpiDataView)(this.oTrans.EpiDataViews["YourDataView"])).AddRowRule(rrCreateRowRuleYourDataViewOrderDtl_OrderNumEquals_asdf);
}
Hi Brian,
Thank you for the sample code. Looks like I’ll have to go that route instead of using the built-in wizard. I was hopeful that there was a simple way to add in some more styles and still use the pre-built rule wizard. Just trying to make use of the lazy way!
Josh
Right, I used the Rule Wizard in the form customization, selected EpiStyle_Warning and then changed the ControlSettings properties from EpiStyle_Warning to the BackColor property. Only one line needed to be changed.
Got it, I see what you mean now! I’ve been bouncing back and forth between the dashboard and the deployed customization and never noticed the row rule wizard in the latter. Time to move all the dashboard color rules over to the customization instead!
Thanks for your assistance!
Josh