Could you just turn off the button cell in the plain empty text box?
Dim cell As DataGridViewButtonCell = dgv.row(x).cell(y) cell = New DataGridViewTextBoxCell() cell.value = String.Empty cell.ReadOnly = True
It loses its "Button" border appearance and mixes with the rest of the cells (assuming you use the default DataGridViewTextBoxCells).
Here's the equivalent in C #, plus it highlights the field so that it looks read-only:
var cell = dgv[column, row] = new DataGridViewTextBoxCell(); cell.Value = ""; // ignored if this column is databound cell.ReadOnly = true; cell.Style.BackColor = Color.FromKnownColor(KnownColor.Control);
user295190
source share