如何更改datagridview选择的行背景颜色? [英] How do I change the datagridview selected row background color?
本文介绍了如何更改datagridview选择的行背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C#windows应用程序中更改datagridview选择行背景颜色?
解决方案
在DataGridView上有一个 DefaultCellStyle
,里面有 SelectionBackColor
和 SelectionForeColor
属性。 / p>
如果您发现您选择的样式未被应用,则DataGridView将使用样式继承提示:
http://msdn.microsoft.com/en-us/library/1yef90x0。 aspx
How do I change the datagridview selected row background color in C# windows applications?
解决方案
On the DataGridView there is a DefaultCellStyle
, inside this there is SelectionBackColor
and SelectionForeColor
properties.
The DataGridView uses a style inheritance idea, in case you find that the style you pick is not being applied:
http://msdn.microsoft.com/en-us/library/1yef90x0.aspx
这篇关于如何更改datagridview选择的行背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文