我想动态地改变某些特定单元格的前景和背景颜色,具体取决于另一个单元格值或事件。如何更改Janus GridEX特定单元格的颜色?
例如,当用户单击单元格时,其背景颜色应为RED。
我的代码是这样的:
Janus.Windows.GridEX.GridEXFormatStyle style1 = new GridEX.FormatStyle();
style1.ForeColor = Color.Red;
mySpecificCell.FormatStyle = style1;
它的工作原理,但是当我向下滚动,然后再向上滚动,细胞恢复到原来的颜色的颜色。
我的代码有什么问题?我应该如何克服这一点?