Hi guys,
I was wondering whether there was anyway to add a column to a datagridview where each cell in that column contains a check box that the user can change the state of as they wish?
Thanks in advance for any help.
:afrog:
Printable View
Hi guys,
I was wondering whether there was anyway to add a column to a datagridview where each cell in that column contains a check box that the user can change the state of as they wish?
Thanks in advance for any help.
:afrog:
Do you mean at design time or run time? There is specifically a DataGridViewCheckBoxColumn class. At design time you add a column and then in its properties you set its type to check box. At run time you create a check box column object and add it to the grid's Columns collection. If you bind a DataTable that contains a boolean column to a grid then a check box column will be generated automatically. If you mean you want to add an unbound column to a bound grid then guess what: MSDN has an article dedicated to the subject.
http://msdn2.microsoft.com/en-us/library/zkatshfa.aspx
Thanks found what i needed