this.dataGridView1.CellPainting += (s, e) =>
{
if (e.ColumnIndex == 1)
{
e.Paint(e.ClipBounds, e.PaintParts & ~DataGridViewPaintParts.Focus);
e.Handled = true;
}
};
Cellborder datagridview
ankit goel
746
Reputation points
Hi ,
in my datagridview , i have turned off the cell border by using
this.CellBorderStyle = DataGridViewCellBorderStyle.None;
but still when its cell gets focused by using mouse , i can there there is a dashed line type border in the cell . To prevent this , i tried using
this.SelectionMode = DataGridViewSelectionMode.FullRowSelect , but no success . How to prevent this please suggest
Accepted answer
-
gekka 8,141 Reputation points MVP
2023-10-25T03:57:37.8566667+00:00