c#中如何将数据库中查到的信息添加到listview中显示?

2024-12-16 15:31:44
推荐回答(1个)
回答1:

ListViewItem listViewItem = new ListViewItem(number);

listViewItem.SubItems.Add(name);
listViewItem.SubItems.Add(id);
listViewItem.SubItems.Add(address);
listViewItem.SubItems.Add(phone);
listViewItem.SubItems.Add(admission_time);
listViewItem.SubItems.Add(departments);
listViewItem.SubItems.Add(classes);
listViewItem.SubItems.Add(birthday);

listView1.Items.Add(listViewItem);