Creation of custom styles, or more colors for row rules

It would be nice if we had more than the 4 options for row rules. There are some workarounds to hijack a row rule to get the color you want for conditional highlighting, but it would be nice if you could either create a custom status (local and global?) or be able to simply choose a color.

You can create a

ControlSettings cs = new ControlSettings();

and pass that into your rule you can set color, font,read only rainbow hats and anything you want in there… then pass that into your rowrule

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

		//Assing it to the RowRule
		RuleAction epireadonlySalesTer_Comment = RuleAction.AddControlSettings(this.oTrans, "SalesTer.Comment", myCustomSetting);
		RuleAction[] ruleActions = new RuleAction[] {
		// Create RowRule and add to the EpiDataView.
		RowRule rrCreateRowRuleSalesTerCompanyEquals_Constant_CompanyID = new RowRule("SalesTer.Company", RuleCondition.Equals, "Constant: CompanyID", ruleActions);
		// **** end autogenerated code ****



That’s very helpful. Thanks!

This is what I mean by “hijack” the row rule.

I still think that it would be helpful if a new style could be created via a wizards, so that the row rule wizard could be used to create the code so you don’t have to use this code to do that, or even to be able to set it in the properties section of the controls so you don’t need the code. Just something to make it easier for everyone. I am finally getting to where I can do something like you posted, but I know that there are a lot of users that aren’t to that ability yet, and it would make it easier for customization.

1 Like