我有兩個列表框命名 ListBox1的和listbox2移動項目,反之亦然
listBox1.DataSource = dt1;
listBox1.DisplayMember = "EmployeeName";
listBox1.ValueMember = "EmployeeId";
listBox2.DataSource = dt2;
listBox2.DisplayMember = "EmployeeName";
listBox2.ValueMember = "EmployeeId";
現在我想移動從ListBox1中到listbox2項目,反之亦然
我試過,但它顯示數據源分配時異常無法更改值
異常「設置DataSource屬性時無法修改Items集合。」