c# - 具有多列的 WinForms 组合框 (C#)?

标签 c# winforms combobox

我目前正在使用以下代码来填充组合框:

combobox.DataSource = datatable;
combobox.DisplayMember = "Auftragsnummer";
combobox.ValueMember = "ID";

有没有办法显示多列。我为 DisplayMember 尝试了“Auftragsnummer、Kunde、Beschreibung”,但它没有用。

最佳答案

您不能有多个列。虽然您可以将多个字段连接为显示成员

查看: How do I bind a Combo so the displaymember is concat of 2 fields of source datatable?

关于c# - 具有多列的 WinForms 组合框 (C#)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1091414/

相关文章:

c# - ComboBox-> 在右侧添加这个小三角形

c# - 从 DataTable 批量插入到 SQLCE DataSource

winforms - 在 Visual Studio 中隐藏警告的特定实例?

c++ - 如何创建 Qt 组合框

c# - 在 DataGridView 中处理 TextBox 中的导航键

c# - 在 DataGridView 中显示列作为密码输入类型

c# - 为什么我的背景颜色在 ComboBox 中不起作用

c# - 程序集中的类型未标记为可序列化

c# - 可以使代码分析理解代码契约吗?

c# - 从单元测试调用时,Application.Current 为空