我有DataTable
包含必要DataRows
的,我想显示在ComboBox
. 第二个DataColumn
被称为VALUE
,我想把它变成一个DisplayMember
.
但是,根据. ComboBox
_ 我究竟做错了什么?DataRows
DataTable dataTableManufacturers;
dm = new DatabaseManagement.DatabaseManagement(Properties.Settings.Default.DBServer,Properties.Settings.Default.DBName, Properties.Settings.Default.DBUser, Properties.Settings.Default.DBPassword);
dataTableManufacturers = dm.getManufacturers();
combxManufacturer.DisplayMemberPath = "VALUE";
foreach (DataRow row in dataTableManufacturers.Rows)
{
combxManufacturer.Items.Add(row);
}