WinForms组合框与多列(C#)? [英] WinForms combobox with multiple columns (C#)?
本文介绍了WinForms组合框与多列(C#)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在使用以下代码来填充组合框:
I am using currently the following code to populate a combobox:
combobox.DataSource = datatable;
combobox.DisplayMember = "Auftragsnummer";
combobox.ValueMember = "ID";
有办法显示多个列。我尝试了Auftragsnummer,Kunde,Beschreibung为DisplayMember,但它没有工作。
Is there a way to display multiple columns. I tried "Auftragsnummer, Kunde, Beschreibung" for DisplayMember but it did not work.
推荐答案
虽然您可以将多个字段串联为显示成员
You can't have multiple columns. Though you can have concatenation of multiple fields as Display Member
这篇关于WinForms组合框与多列(C#)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文