this.dataGridView1.CellPainting += (s, e) =>
{
if (e.ColumnIndex == 1)
{
e.Paint(e.ClipBounds, e.PaintParts & ~DataGridViewPaintParts.Focus);
e.Handled = true;
}
};
Cellborder datagridview
ankit goel
766
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
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,927 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,470 questions
Accepted answer
-
gekka 12,021 Reputation points MVP Moderator
2023-10-25T03:57:37.8566667+00:00