我有一个数据网格视图,我在其中设置了这样的值
string query = "select CustomerId,CustomerName from tbl_Customer where flag=0";
SqlDataAdapter daCustomer = new SqlDataAdapter(query, con);
daCustomer.Fill(ds, "Customer");
cmbCustomerName.DisplayMember = "CustomerName";
cmbCustomerName.ValueMember = "CustomerId";
cmbCustomerName.DataSource = ds.Tables["Customer"];
cmbCustomerName.ResetText();
但它在这一行之后给了我这个错误
cmbCustomerName.DataSource = ds.Tables["Customer"];
当我设置数据源时。请帮我解决这个问题。