在Datagridview中设置的背景颜色 [英] Background color set in Datagridview

查看:773
本文介绍了在Datagridview中设置的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何使用自定义颜色在datagridview中设置背景颜色。



for例如:HTML标记颜色的datagridview设置为背景色



问候

拉杰什V

解决方案<。 / DIV>
像这样:<预LANG = C#> <跨度类= 代码关键字> INT 的rowIndex = <跨度类= 代码位> 0 ; dataGridView1.Rows [rowIndex位置] .DefaultCellStyle.BackColor = Color.Yellow;


回答这个链路的1可以是用于您有用...

​​如何改变的DataGridView控制在所有形式的背景颜色编程在C#的.NET一个项目的? [ ^ ]


Hi,

How to set background color in datagridview, using custom color.

for example: html tag color set to background color in datagridview.

Regards
Rajesh V

解决方案

Something like this:

int RowIndex = 0; dataGridView1.Rows[RowIndex].DefaultCellStyle.BackColor = Color.Yellow;


Answer 1 of this link may be useful for you...
How to change the DataGridView controls background Color in all the forms of a project programatically in C#.NET?[^]


这篇关于在Datagridview中设置的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆