Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Checkbox in DatagridView Win Form
 

Checkbox in DatagridView Win Form

I’m populating a datagridview (dgw) with a dataset with Names. Every name is in a specific group numbered from 1 �3. When I open up my win form with the dgw I want to list all the people in the db. Next to the dgw I have a dropdown list where I can select each group. When I select ex. Group 1, I want all people from the db listed but everyone from group 1 should have a checkbox selected.

Can anyone please help me?

TMenzel  Wednesday, September 16, 2009 6:33 AM
So you have a checkbox column in the DataGridView and when you click a button you want certain rows to be checked?

One way you could do this is to loop through all of the rows in the DataGridview and check the group. If it matches the desired group, check the checkbox.

Another option is to update the underlying DataSet.

Is the checkbox column also in the Dataset?

Hope this helps.

www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Thursday, September 17, 2009 4:12 AM

You can use google to search for other answers

Custom Search

More Threads

• Listbox does not show Bound data?
• search dataset
• Strange behaviour on a datagridview
• DataGrid - Adding Column LastName (I have Customer Number)
• BindingSource automatically updating DataSource
• BindingSource Custom Collection.
• Moving to a record
• Binding Navigator - Enable/Disable Save Button
• How to populate a combo box with a DataSet in C#
• hierarchical dataviewgrids