I’ve seen this question, and have set CellBorderStyle to None, but for some reason I am still getting gridlines on my DataGridView:

This is the code I am using to initialize my control:
public FtpTransferGridView()
{
this.AutoGenerateColumns = false;
this.DoubleBuffered = true;
this.ReadOnly = true;
this.AllowUserToAddRows = false;
this.AllowUserToDeleteRows = false;
this.AllowUserToResizeRows = false;
this.ShowEditingIcon = false;
this.RowHeadersVisible = false;
this.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
this.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(240, 240, 225);
this.RowTemplate.Height = 20;
this.CellBorderStyle = DataGridViewCellBorderStyle.None;
this.BackgroundColor = System.Drawing.SystemColors.Window;
InitializeColumns();
}
What am I missing here?
The problem was related to the custom painted progress column cells.
In it’s cell paint method I had code similar to:
The error would happen when the method would exit without painting the progress bar, leaving the graphics smoothing mode in an incorrect state.
Settings the
SmoothingModeof theGraphicsonly after thevalue <= 0check solves the problem: