在数据网格视图中删除的行头编程 [英] removing row header in datagrid view programmatically
本文介绍了在数据网格视图中删除的行头编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个数据网格视图和我想删除的行头中所有的行...
I have a datagrid view and i want to remove the row header for all rows...
我试图消除圆形部分,如图belowfigure(行头)
I am trying to remove the rounded part as shown in belowfigure (Row header)
有关,我已经写了code以下....但它不是沃金......
For that I have written the code below.... but it s not woking....
private void dgvProducts_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
e.PaintCells(e.ClipBounds, DataGridViewPaintParts.All);
e.PaintHeader(DataGridViewPaintParts.All
| DataGridViewPaintParts.Border
| DataGridViewPaintParts.None
| DataGridViewPaintParts.SelectionBackground
| DataGridViewPaintParts.ContentBackground);
e.Handled = true;
}
将任何请提供任何样品code在数据网格视图中删除的行头......
would any pls give any sample code for removing row header in datagrid view .....
许多在此先感谢.....
Many thanks In advance.....
推荐答案
查找在设计师的DataGridView的一个RowHeadersVisible属性。
Look for a RowHeadersVisible property on the DataGridView in the designer.
这篇关于在数据网格视图中删除的行头编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文