MultiColumn Combobox in DataGridView

n70n1

Member
Joined
Oct 1, 2012
Messages
8
Programming Experience
3-5
Hi all Master, I need help again about DataGrdiView
How to set MultiColumn Combobox in DataGridView, read from one or more table in database.

Thanks
 
First things first, you will need to create a custom control that inherits the standard ComboBox class and adds the multi-column support. There are several examples on the web so you should search and then experiment with an implementation until you get it working in place of a regular ComboBox.

Once you have the control working, you can then create a custom column and cell type for the DataGridView that uses that custom combo box as its editing control. There's an example of how to do that on MSDN entitled "How to: Host Controls in Windows Forms DataGridView Cells". The MSDN web site search function is broken at the moment so I can;t give you a URL, but it's in the local Help too.
 
Back
Top