使用以下内容,
DataTable Customers = GetAllCustomers();
lbCustomers.DataSource = Customers;
listBox1.DisplayMember = "firstName";
listBox1.ValueMember = "phoneNumber";
我的列表框中充满了System.Data.DataRowView
我做错了什么?
答案 0 :(得分:0)
不应该
DataTable Customers = GetAllCustomers();
lbCustomers.DataSource = Customers;
lbCustomers.DisplayMember = "firstName";
lbCustomers.ValueMember = "phoneNumber";