views:

55

answers:

2

How to use CheckedListBox control in DataGridView Control in Windows Forms.

These are under the namespace. System.Windows.Forms.CheckedListBox and System.Windows.Forms.DataGridView

Is it possible.

A code snippet will be a great help

EDIT

I need an help on this link that I found. I hope this might work. But I am more interested on how will it work. What exactly is happening at each step.

A: 

How can you use a WebForms control in WinForms? There is no CheckBoxList class for WinForms (unless you roll you own).

leppie
@leppie: I can clearly see CheckedBoxList control in my tool box. Moreover I have used CheckedBoxList many times in windows forms. But right now i want to use it in DataGridView control which is again of Windows form
Shantanu Gupta
@Shantanu Gupta: You have now changed the name of the class... And I still do not see this for WinForms.
leppie
@Shantanu Gupta: What is the namespace and assembly of either/both of those classes you mention?
leppie
@leppie: Actually there was a typo in writing name, in the title its name is still the one you read. Now I am correcting. Sry for typo misunderstanding
Shantanu Gupta
I see you actually mean `CheckedListBox`
leppie
After your revisions the class name is still incorrect. Please fix.
leppie
A: 

See this solution. I think it does what you want.

Tri-State TreeView Control

Peladao
@Peladao: I need this kind of functionality under DataGridView control otherwise i can use CheckedListbox control as well.
Shantanu Gupta
Oops, sorry. But same approach could perhaps be used for DataGridView. Requires some work though.
Peladao