I have 2 pairs of Master-Details (dgvs) datagridviews that are linked together. I also use binding sources for each table. See image.
When I click on a row for the Link_Contract_Letting dgv, it updates the Contracts dgv, but does not update the Deses dgv. If I click on the Contracts dgv the Deses dgv does update. How can I get the Deses dgv to update when someone clicks a row in the Link_Contract_Letting dgv?
This code is close. It shows the correct contract and filters the deses. The problem with it is the other contracts related to the Letting are removed. That is a problem because I cannot see the other related contracts.
string contId = dgvLinks.SelectedCells[0].Value.ToString();
bsContracts.Filter = $"ContId IN ({string.Join(", ", contId)})";
This code does not work at all, but does not show an error:
string contId = dgvLinks.SelectedCells[0].Value.ToString();
bsDeses.Filter = $"ContId = " + contId;
I have also tried Refresh() and EndEdit() after the above code.