THE Multi Column ComboBox

D

DraguVaso

Hi,

The Multi column comboBox is a well spoken control, that a lot of people
desire, and a lot of people buildtheir own. I tested a lot of them, but none
really was what i wanted to have.
But does anybody knows where I can find the best Multi column combobox? One
that supports a lot of columns, possiblities to get the values in each
column for the selected item, adding a DataSource etc...
It should be free, and if possible with the source code (in VB.NET).

Thanks a lot in advance,

Pieter
 
C

Cor Ligthert

Pieter,

What is for you a multicolumn combobox. For me it sounds as more comboboxes
side by side in a group box. However probably you mean something else with
it?

Cor
 
D

DraguVaso

Hi Cor,

I mean:
1 combobox, but with in the dropdown-list more than 1 columns (and not 1
like there is on the normal combobox).

Pieter
 
C

Cor Ligthert

Pieter,

I still don't know what you mean, did you ever tried this, try it and tell
than what is good or wrong on it.

\\\needs 3 comboboxes side by side on a form and pasting in this code.
Private Sub Form1_Load(ByVal sender _
As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dt As New DataTable
dt.Columns.Add("a")
dt.Columns.Add("b")
dt.Columns.Add("c")
dt.LoadDataRow(New Object() {"Pieter", "Belgie", "Lambik"}, True)
dt.LoadDataRow(New Object() {"Cor", "Holland", "Heineken"}, True)
dt.LoadDataRow(New Object() {"Rinze", "Zeeland", "Stella"}, True)
dt.DefaultView.Sort = "b"
ComboBox1.DataSource = dt
ComboBox1.DisplayMember = "a"
ComboBox1.ValueMember = "b"
ComboBox2.DataSource = dt
ComboBox2.DisplayMember = "b"
ComboBox2.ValueMember = "c"
ComboBox3.DataSource = dt
ComboBox3.DisplayMember = "c"
ComboBox3.ValueMember = "a"
End Sub
///
I hope this helps,

Cor
 
D

DraguVaso

Hehe no: you have more than one comboboxes.
Waht I need is only 1 (one, één, uno, eins) combobox :)
With multiple (more than one, meerdere) columns in the dropdown-list :)

Like you can see here:
http://www.vbaccelerator.com/home/NET/Code/Controls/ListBox_and_ComboBox/Icon_ComboBox/article.asp
or here:
http://www.codeproject.com/vb/net/multicolumncombo.asp
or here:
http://www.codeguru.com/Cpp/controls/combobox/multicolumncombos/article.php/c1829/

But none of these are really nice. So I'm looking for a real good solution.

And also for you Cor: how do YOU call these things? :)
 
C

Cor Ligthert

Pieter,
Hehe no: you have more than one comboboxes.
Waht I need is only 1 (one, één, uno, eins) combobox :)
With multiple (more than one, meerdere) columns in the dropdown-list :)

Do you mean a combobox where in you can say something as.

Datasource = mytable
Displaymembers are a, b, c
Valuemembers are x, y, z

And than it is displayed in one string row and returned in one string row,
ore do you want to have returned independent objects.

Cor
 
D

DraguVaso

I prefer independed objects. something like the .Item value most controls
have...
..Item(0).Text, .Item(1).Text, .Item(3).Text etc...

The best would be if you could thread the Datasource/DropDownList as a
DataTable, and the selected value as a DataRow...
 
C

Cor Ligthert

Pieter,
The best would be if you could thread the Datasource/DropDownList as a
DataTable, and the selected value as a DataRow...
And what is than wrong with concatination the columns using an extra columns
in the datatable as often is showed here in these newsgroups. For the
valuemembers from the datarow the concurrencymanager can of course be used.

(I know a reason however asking it to you)

:)

Cor
 
D

DraguVaso

It's jsut ugly :)
It won't be a nice presentation with columns, but just every time a line
with a lot af values next to each other, and absolutely not well-presented.

Actually: it's really the solution with the columns I need. and I jsut know
that there are a lot of them on the internet, but I jsut want to have the
opinion of the people who used them :)
 
M

Marina

I don't know about free ones - the quality/support there may not bee too
reliable. There are definitely vendors out there that sell controls like
this (e.g. Infragistics).

If spending money is not an option, then you can contenate fields together
as was suggested in other thread. You can pad each columns to a set # of
characters, so the text in each column lines up. This should work if a fixed
width font is being used.
 
P

Peter D. Dunlap

It's jsut ugly :)
It won't be a nice presentation with columns, but just every time a line
with a lot af values next to each other, and absolutely not well-presented.

Actually: it's really the solution with the columns I need. and I jsut know
that there are a lot of them on the internet, but I jsut want to have the
opinion of the people who used them :)
Sounds like what you want is a ComboBox where the dropdown displays a
DataGrid or a ListView in detail mode, no?

I don't know of any free ones that do this, though I haven't looked
for one. SyncFusion has a package with that in it, but that is
*definitely* not free!
 
C

Cor Ligthert

Pieter,

That was I expecting. So what you need is a single column datatbox with a
tab seperator in the text part of it. The nicest is when the seperator is
visible as a |.

Right?

Cor
 
D

DraguVaso

Yes but is still ugly :)
and if you do it like this you have to calculate the ith of the text to have
everything nice set :)

Not like this :)
Pieter | Belgium | Maes
Cor | Netherlans | Heineken
 
C

Cor Ligthert

Pieter,

I tried to explain that you wanted a tab setting than this problem is in my
opinion gone. Now you give an reply on the answer from Marina. (I wrote this
because maybe somebody has done this and can than help you).

:)

Cor
 
D

DraguVaso

Hehe no he meant me :)
I live in Gent! :) Which has some colonial posessions like Belgium and The
Netherlands ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top