|
-
Oct 16th, 2006, 06:34 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] [2005] add column to datagridview
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.
-
Oct 16th, 2006, 08:37 AM
#2
Re: [2005] add column to datagridview
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
-
Oct 16th, 2006, 09:19 AM
#3
Thread Starter
Fanatic Member
Re: [2005] add column to datagridview
Thanks found what i needed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|