Multi Column List or Control box

johncassell

Well-known member
Joined
Jun 10, 2007
Messages
120
Location
Redcar, England
Programming Experience
Beginner
Hi there,

Would anyone be able to tell me if it is possible to create a list or control box which will show multiple columns from a database table.

For example, a customer table shows 1. Customer ID number, 2. Customer Name, 3. Customer first line of address.

I would like the drop down box to show all three columns but after selection only enter one of the values.

Is this possible at all?

thanks in advance for any replies,

John
 
I haven't tried to do this at all in net 2.0 but back in the old days i used a trick to accomplished the same functionality for an asp form.

What I did was using a monospace font where each character has the exact same width and pad each columns with enough trailing spaces so they all lined up perfectly. It worked out pretty well in the end.
 
Hi Brian,

thanks for the reply. Much appreciated.

I think I may not have explained myself correctly on this. I have a combobox at the moment and when I click on it, it shows one list of customer names.

This is ok but there are some customers with the same name and it would be useful if we could make the drop down show the customer name and the customer code.

After someone has selected the customer, the combobox should be populated with the customer name only.

I have attached a pic of what it should look like.

Hope you can help!! :-)

Thanks again

John
 

Attachments

  • multicolumnexample.JPG
    multicolumnexample.JPG
    31.3 KB · Views: 66
you can try the Infragistics NetAdvantage 2006 Volume 2 CLR 2.0. it provide a WinGrid control can do exactly what you want.
 
Hi pisceswzh,

thanks for the reply. So is this definitely not a standard feature in Visual Studio?

Also, the product you recommended. Is this something you have to pay for?

Thanks

John
 
i am not quite sure whether the standard feature of VS can do this or not.

but i am currently using the infragistics in my project and it works quite well and it is also easy to be implememted.

THEROTICALLY, you have to pay for it. But you can take you chance on eMule!!
 
Here is the online help file, you can check it out for what it can do.

http://help.infragistics.com/NetAdvantage/NET/2006.2/CLR2.0/
Go thru the tree Windows Forms -> The Toolset -> Controls and Components -> WinCombo to read details on the control you want.

btw, the control you want is named WinCombo, not WinGrid, I made a mistake before. WinGrid is also a very powerful control in the package and the features of WinCombo is actually derived from WinGrid. Maybe you should also take a look on WinGrid.
 
ComponentOne can also do this and yes it will be something you have to pay for. I've been using ComponentOne in all my apps since I first started programming in VS2003 a couple of years back.

The ComponentOne combo box allows you to basically have a grid display in your dropdown, so you can display more than one column of the DataSource you are linked to.

No way of doing this with the standard MS combobox as far as I'm aware.

DO NOT RECOMMEND ILLEGAL SOFTWARE
and if you're advertising it on the forums don't be surprised if admin ban your user account....
 
Back
Top