出现问题:
当多个ComboBox绑定同一个数据源后,只要更改其中一个的选择项时,其它的ComboBox也跟着改变了
解决办法:
DataTable dt = new DataTable();
dt = Common.XmlToDatatable(mPath, "常用四至");
DataRow dr = dt.NewRow();
dr["四至名称"] = "";//添加空行
dt.Rows.InsertAt(dr, 0);
cmbDZ.DataSource = dt.Copy();
cmbDZ.DisplayMember = "四至名称";
cmbNZ.DataSource = dt.Copy();
cmbNZ.DisplayMember = "四至名称";
cmbXZ.DataSource = dt.Copy();
cmbXZ.DisplayMember = "四至名称";
cmbBZ.DataSource = dt.Copy();
cmbBZ.DisplayMember = "四至名称";