Question Multi-row combo or list boxes, with each row a dropdown list

phudgens

Member
Joined
Oct 3, 2012
Messages
5
Programming Experience
10+
Does anyone know of a way to have multiple rows in a single combobox, where each row is it's own dropdown list? If so, could there be multiple columns in a combobox, with multiple rows in each column, where each row is a dropdown list? If there is no way with a combobox, could this be done with a listbox, where each row in the listbox is a dropdown? I'm using VB.Net in VS 2010. I've searched help and online to no avail.

Thanks
Paul Hudgens
 
Multiple rows in a single ComboBox doesn't really make sense. You might look at using a DataGridView with a combo box column, so the cell in that column for each row will use a ComboBox control for editing.

The standard ComboBox control doesn't support multiple columns but there are quite a few examples online of custom controls that inherit ComboBox and add that functionality. It's also possible to create custom column and cell types for the DataGridView, so it would be possible to host a multi-column ComboBox in a DataGridView.
 
My program can require any number of user-selected input files depending on the scope of what the user is trying to accomplish. Each of these input files requires a secondary file, also selected by the user. The secondary file contains information which tells the program what to do with the data in the primary file. All of this data is then combined into a single output product. Once the user has specified an input folder (in which all input files must be located), the program compiles lists of available primary and secondary files based on file type. From this perspective, a multi-column/multi-row combo box makes a lot of sense. In the first column, each row contains a dropdown list of available primary files. In the second column, each row contains a dropdown list of available secondary files. The user selects one or more of the primary files to be used (ideally via a checkbox), and then selects the appropriate secondary file in column 2 to be used for each selected primary file.

Apparently this is outside the scope of a standard combobox - I had just wondered if there was a way to extend it's capabilities, or if there was some other control (listbox?) that might accomplish this. I am not familiar with DataGridView - I'll have a look.

Thanks,
Paul Hudgens
 
From this perspective, a multi-column/multi-row combo box makes a lot of sense. In the first column, each row contains a dropdown list of available primary files. In the second column, each row contains a dropdown list of available secondary files.
No, it makes no sense at all. You talk about a single ComboBox with multiple columns and multiple rows but then you go on to describe multiple drop-down lists, so that is a grid with multiple columns and multiple rows with a ComboBox in each cell, exactly as I suggested.
 
Back
Top