答案 0 :(得分:2)
您可以处理CellPainting
的{{1}}事件,并以这种方式在指定行的底部绘制一个双边框:
DataGridView
另外,您可以将指定行的DividerHeight
设置为更大的值:
void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex == 1 && e.ColumnIndex >= 0)
{
e.Paint(e.CellBounds, e.PaintParts);
e.Graphics.DrawLine(Pens.Black, e.CellBounds.Left,
e.CellBounds.Bottom - 2, e.CellBounds.Right, e.CellBounds.Bottom - 2);
e.Graphics.DrawLine(Pens.Black, e.CellBounds.Left,
e.CellBounds.Bottom - 4, e.CellBounds.Right, e.CellBounds.Bottom - 4);
e.Handled = true;
}
}