Bernhard Bernhard - 6 months ago 68
C# Question

Add combobox to ListViewItem

I'm creating a Windows Form application using C#. The form contains a ListView. It's an application for a Red Cross Dispatcher.

The ListView has a list of all units. Each unit has a status. This status needs to be changeable. Therefore I want to add a comboBox with all available statuses to each ListViewItem. The Statuses are stored in a MySql database.

How can I do this?


Here's a Microsoft sample article showing exactly how to do this: How to use a ComboBox control to edit data in a ListView control in Visual C#

You'll just have to change how it loads it's data.