问题描述
datagridview行标题作为父表单出现.如果背景形式为黑色,则datagridview行标题为黑色.
< img src ="http://i46.tinypic.com/vvsys.jpg" border ="0" alt = 由TinyPic托管图像和视频">
以下是快照的链接
http://i46.tinypic.com/vvsys.jpg [ ^ ]
谢谢&问候,
Ata
The datagridview row header is coming as parent form. if the background form is black color then datagridview row header is coming as black.
<img src="http://i46.tinypic.com/vvsys.jpg" border="0" alt="Image and video hosting by TinyPic">
below is the link for snapshot
http://i46.tinypic.com/vvsys.jpg[^]
Thanks & Regards,
Ata
推荐答案
如果您不想拥有一个行标题,将datagridview的"RowHeadersVisible"属性设置为false,如下所示:
dataGridView1.RowHeadersVisible = false;
如果要为行标题设置其他颜色,请使用以下代码:
dataGridView1.RowHeadersDefaultCellStyle.BackColor = Color.Red;
dataGridView1.EnableHeadersVisualStyles = false;
If you don''t want to have a row header, set the "RowHeadersVisible" property of datagridview to false as given below:
dataGridView1.RowHeadersVisible = false;
If you want to set a different color to row header, use the code below:
dataGridView1.RowHeadersDefaultCellStyle.BackColor = Color.Red;
dataGridView1.EnableHeadersVisualStyles = false;
这篇关于Datagridview行标题不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!