What’s the best way to create a data bound multi column Combo box?
To use a user combo box coupled with a data grid view?
Or to use a ListViewCombo Box
I have created a MCCB by using a custom user control and adding a custom combo box and linking it to a DGV.
I have then reduced the size of the user control to that of the combo box and dicked the combo box to the control.
When a try to populate the DGV, however no columns get added, despite the DataTable in the BindingSource containing values
public void refreshMCC(BindingSource BS)
bsCombo = BS;
dgvMCC.ColumnHeadersHeight = MultiColumnCombo.Height;
dgvMCC.AutoGenerateColumns = true;
dgvMCC.DataSource = bsCombo;
Is there an example I can look at?
Thanks for your help Ewan
Our new development build 1.5.44 includes the following fix & enhancement:
I created a test DGV and used the same code to populate it and it works fine.
The event DataBindingComplete does fire
So it seems you cannot use a DGV as a drop down on a combo box in a straightforward way.
(Does it need to be a user control containing a docked dgv and the user control used as the drop down?)
The event DataBindingComplete does not fire despite the binding source changing.
An empty DGV drops down.
Also noticed with the test grid that auto sizing the columns based on row contents does not work.
DGV display is flaky on Edge missing grid lines etc. (Not IE or Chrome)
Please login first to submit.