Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB
How do I add a check box in a datagridview in vb.net?
Posted 15-Dec-09 1:29am
Edited 9-Dec-10 21:29pm
Dalek Dave431.3K
v2
Comments
Dalek Dave at 10-Dec-10 3:29am
   
Minor Edit for Grammar.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You could do this by using the VS IDE[^].
 
This can be done also by writing some code. Wink | ;)
 
Here is an example for you:
 ' 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! Smile | :)
 
Regards
  Permalink  
Comments
RaviRethi at 26-Jul-13 0:55am
   
Thank you so much
Dalek Dave at 10-Dec-10 3:30am
   
Good Answer.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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??
  Permalink  
Comments
Dalek Dave at 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)

  Print Answers RSS
0 Maciej Los 469
1 OriginalGriff 379
2 CPallini 205
3 Sergey Alexandrovich Kryukov 170
4 Sharmanuj 109
0 OriginalGriff 5,649
1 Sergey Alexandrovich Kryukov 4,783
2 Peter Leow 2,954
3 Maciej Los 2,689
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 10 Dec 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid