Changing grid backcolor without row rule

I’m trying to change the backcolor of a grid in an updatable dashboard. Row rule works but I want to change the color dynamically as a cell is updated. To get started I tried to change the entire grid color but it’s not working.

What am I missing?

// **************************************************
// Custom code for MainController
// Created: 8/26/2022 9:05:05 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Infragistics.Win.UltraWinGrid;
using System.Drawing;

public class Script
{
	// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
	// Begin Wizard Added Module Level Variables **

	// End Wizard Added Module Level Variables **

	// Add Custom Module Level Variables Here **
	EpiUltraGrid myGrid;

	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

		// End Wizard Added Custom Method Calls
		myGrid = (EpiUltraGrid)csm.GetNativeControlReference("3e56a12e-70a8-44f8-9f17-becc0f99c4ae");
		this.myGrid.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.myGrid_InitializeRow);
	}

	public void DestroyCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
		this.myGrid.InitializeRow -= new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.myGrid_InitializeRow);
	}

	private void myGrid_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
	{
		e.Row.Appearance.BackColor = Color.Blue;
		e.Row.Appearance.ForeColor = Color.White;
	}

}

I think RowRules are still a better option. Try this:

I would fuse row rule if I can specify the color dynamically based on the cell data.
When I tried the rule with custom rule it seems to process this custom setting once and doesn’t evaluate it again. I tried it in the condition as well as in action section but it will not change the color.

		//Create a custom control setting
		ControlSettings myCustomSetting = new ControlSettings();
		//Set it orange
		myCustomSetting.BackColor=System.Drawing.Color.Orange;

You can specify the color in a row rule if you setup custom styles.

Jason Woods
http://LinkedIn.com/in/jasoncwoods