添加组合框的ListViewItem [英] Add combobox to ListViewItem
问题描述
我创建使用C#一个Windows窗体应用程序。该表格包含一个ListView控件。这是一个红十字会调度的应用程序。
I'm creating a Windows Form application using C#. The form contains an ListView. It's an application for an Red Cross Dispatcher.
ListView控件有各单位的名单。每个单元都有一个状态。这种状况必须changeble。因此,我希望与所有可用statusses每个ListViewItem的添加一个组合框。的Statusses存储在MySQL数据库。
The ListView has a list of all units. Each unit has an status. This status needs to be changeble. Therefore I want to add an combobox with all available statusses to each ListViewItem. The Statusses are stored in an MySql database.
我怎样才能做到这一点?
How can I do this?
推荐答案
下面正是说明如何做到这一点微软样本文章:的如何使用ComboBox控件在Visual C# ListView控件编辑数据
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.
这篇关于添加组合框的ListViewItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!