I have a datagrid that shows all the storage_id's. In that datagrid, there's a column that has a combobox that tells me what Lots are available for sale.
There's 2 issues - after I hit the dropdown to get the lot iD - in another row I click on the other dropdown that has a different storageID AND IT BLANKS OUT the "original" cell. I'm wondering if it's because the datasource can only get "one" dataset or something like that. Is there a way around that? I've seen postings about "cascading combobox's " but I don't really want to do that. And I don't really want to have ALL lot's in the same drop down. Is there a way to "filter" multiple "dropdowns"?
I'm sorry if I'm not explaining myself well enough, I had a stroke back in December.
Thank you
Here's the CellClick portion:
private void dgvProd_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 3) { DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand("xxx_scale_storageLotProd", sCon2); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("Co_nbr", THG.Common.Var.gnDefault_Co_Nbr.ToInt32()); cmd.Parameters.AddWithValue("Locn_id", THG.Common.Var.gnDefault_Locn_Id.ToInt32()); cmd.Parameters.AddWithValue("storId",dgvProd.Rows[e.RowIndex].Cells[5].Value.ToString() ); using (SqlDataAdapter adapter = new SqlDataAdapter(cmd)) { adapter.Fill(ds); cReqLot.DataPropertyName = "LotDisplay"; cReqLot.DisplayMember = "LotDisplay"; cReqLot.DataSource = ds.Tables[0]; } } }