Datagridview 去掉单元格焦点虚框 和设置单元格不能被选中
时间:2011-03-10 来源:红旗飘飘
去掉单元格焦点虚框和设置单元格不能被选中
private void kDGV_ghd_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
e.PaintParts = e.PaintParts ^ DataGridViewPaintParts.Focus;
if (toolStripButton审核.Enabled == false || toolStripButton审核.Visible == false)
{
for (int i = 0; i < kDGV_ghd.RowCount; i++)
{
kDGV_ghd.Rows[i].Selected = false;
}
}
}
相关阅读 更多 +