本文介绍了以编程方式为数据网格分配颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个由多行和多列组成的数据网格视图。我想迭代每一行并检查特定列的内容。如果该列包含单词RED,我想将整行的前景颜色更改为Red.f,该列包含单词GREEN,我想将整行的前景颜色更改为绿色。
请建议一些方法来做这个
谢谢
I have a datagridview made up of multiple rows and columns. I want to iterate through each row and check the contents of a specific column. If that column contains the word "RED", I want to change the forecolor of the entire row to Red.f that column contains the word "GREEN", I want to change the forecolor of the entire row to Green.
Please suggest some way to do this
Thank you
推荐答案
这篇关于以编程方式为数据网格分配颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!