Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How do I add a check box in a datagridview in vb.net?
Posted
Updated 9-Dec-10 21:29pm
v2
Comments
Dalek Dave 10-Dec-10 3:29am    
Minor Edit for Grammar.

You could do this by using the VS IDE[^].

This can be done also by writing some code. ;)

Here is an example for you:
VB
 ' Create new column of type: DataGridViewCheckBoxColumn
Dim checkCol As DataGridViewCheckBoxColumn = New DataGridViewCheckBoxColumn()
checkCol.HeaderText = "CheckBox Column"

' Add this column to the DataGridView
dgwDemo.Columns.Add(checkCol)


I hope this helps! :)

Regards
 
Share this answer
 
Comments
sv sathish 26-Jul-13 0:55am    
Thank you so much
Dalek Dave 10-Dec-10 3:30am    
Good Answer.
chidozie 18-Sep-18 7:46am    
men you are a live saver , i have been searching everywhere with no solution in sight until i found this God bless you very much for me Thank you
i need to display the column from dataset also, and as well as dynamically also (like using above code)..
can anyone help me in this??
 
Share this answer
 
Comments
Dalek Dave 10-Dec-10 3:30am    
Best to ask this as a new Question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900