0
Guys I created a checkbox column - Datagridviewcheckboxcolumn - in the Datagridview and would like to know if it is possible, and how do I make this column to become a button column to enable or disable, a Toggle Button?
0
Guys I created a checkbox column - Datagridviewcheckboxcolumn - in the Datagridview and would like to know if it is possible, and how do I make this column to become a button column to enable or disable, a Toggle Button?
0
If you are using the . NET Framework library, see the code below, which will convert all CheckBox
from the 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:
Browser other questions tagged vb.net checkbox button
You are not signed in. Login or sign up in order to post.