Hi @rahul kumar , Welcome to Microsoft Q&A.
It's not a bezel, it's the gap left after the bezel was removed.
You can use a brush to fill in.
protected override void OnCellPainting(DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex == -1 && e.ColumnIndex > -1)
{
e.Handled = true;
using (Brush b = new SolidBrush(this.DefaultCellStyle.BackColor))
{
e.Graphics.FillRectangle(b, e.CellBounds);
}
e.PaintContent(e.ClipBounds);
}
}
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.