BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private Hashtable savedColors = new Hashtable(); private Color lessColor = Color.Red; private Color moreColor = Color.Green; private void gridControl1_CurrentCellValidating(object sender, CancelEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; int oldValue = (int)this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue; try { int newValue = int.Parse(cc.Renderer.ControlText); if(newValue < oldValue) { int key = GetKey(cc.RowIndex, cc.ColIndex); if (savedColors.ContainsKey(key)) savedColors[key] = lessColor; else savedColors.Add(key, lessColor); } else if(newValue > oldValue) { int key = GetKey(cc.RowIndex, cc.ColIndex); if (savedColors.ContainsKey(key)) savedColors[key] = moreColor; else savedColors.Add(key, moreColor); } } catch{} } private int GetKey(int row, int col) { return 100000 * col + row; } void GridQueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if (e.RowIndex > 0 && e.ColIndex > 0) { e.Style.CellValue = this._extData[e.RowIndex - 1, e.ColIndex - 1]; int key = GetKey(e.RowIndex, e.ColIndex); if(savedColors.ContainsKey(key)) e.Style.BackColor = (Color) savedColors[key]; e.Handled = true; } }