'Windows Application Forms Parent-Child relationship using primary-foreign key relationship filter
I am newbie to Windows Application Forms. I have three tables as a source data to my three Forms. Patient Form is the Parent Form, it has primary key ID. Consultation Form is a Child Form which has ID as foreign key. A Patient has multiple consultations at different dates therefore the relationship between Patient and Consultation is one-to-many. Result Form is also a Child Form which has ID as foreign key. A patient has multiple results at different dates therefore the relationship between Patient and Result is one-to-many. I created Patient Form and embedded Consultation Form and Result Form in the same Patient Form in grid format. I want to see filtered list of Consultations and Results based on Patient selection. How do I do this?
Thank you for your help
Solomon
Solution 1:[1]
You can handle the SelectionChanged in the Patients grid so when user selects another row, you refresh the data in the second (Consultation) grid properly. And the same applies to the SelectionChanged event from your second grid, you would have to handle it too, to populate the third grid (Result).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mbd |
