combobox中的selectedindexchanged事件出错
目的combobox2中的值选定之后,改变combobox3中的值private void comboBox2_SelectedIndexChanged_1(object sender, EventArgs e)
{
string strSQl = comboBox2.Text;
string strSQL1 = "Select G_name from 商品表 where G_number=";
strSQL1 += strSQl;
DataSet ds1 = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter(strSQL1, conn);
da1.Fill(ds1, "商品表");
DataTable dt1 = ds1.Tables["商品表"];
comboBox3.DataSource = dt1;
comboBox3.DisplayMember = "G_name";
comboBox3.SelectedIndex = -1;
}
无法绑定由多个部分组成的标识符 "System.Data.DataRowView"。