If you are using the .NET Framework library, see the code below, which will convert all% of column% to a ToggleButton :
In Visual Basic:
For Each column As DataGridViewCheckBoxColumn in SuaDataGrid.Columns
For Each item In column.Cells
CType(item, DataGridViewCheckBoxCell).Appearance = System.Windows.Forms.Appearance.Button
Next
Next
In C #:
foreach (DataGridViewCheckBoxColumn column in SuaDataGrid.Columns)
{
foreach (var i in column.Cells) {
((DataGridViewCheckBoxCell) i).Appearance = System.Windows.Forms.Appearance.Button;
}
}
Sources: