答案 0 :(得分:3)
为CellPainting
事件添加处理程序并更改其中的单元格边框样式:
private void HandleCellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex >= 0 && e.ColumnIndex > 0)
{
e.AdvancedBorderStyle.Right =
e.AdvancedBorderStyle.Left = DataGridViewAdvancedCellBorderStyle.None;
}
}