现在,当我在第一个组合框中选择项目时,第二个组合框模仿了选择。我希望能够分别在每个组合框中进行选择。谢谢。
List<W6AdminUIs2.DictionaryObject> taskStatuses = W6AdminUIs2.GlobalFunctions.GetDictionaryItems("TaskStatus");
// Init the binding source of the statuses.
BindingSource bsFromStatuses = new BindingSource();
bsFromStatuses.DataSource = taskStatuses;
//Bind the "From" combo box to binding source.
cBoxFrom.DataSource = bsFromStatuses.DataSource;
cBoxFrom.DisplayMember = "Name";
cBoxFrom.ValueMember = "Key";
// Init the binding source of the statuses.
BindingSource bsToStatuses = new BindingSource();
bsToStatuses.DataSource = taskStatuses;
//Bind the "From" combo box to binding source.
cBoxTo.DataSource = bsToStatuses.DataSource;
cBoxTo.DisplayMember = "Name";
cBoxTo.ValueMember = "Key";