Hi,
There are 3 tables in the DB: AàBàC
(A is the father, B is the son, C is the grandson).
I have 2 grids: grdA and grdC.
grdA has 2 Bands: band0 displays the data of tableA, band1 displays the data of table B.
grdC displays the data if table C.
I want that when I select a row in grdA-band1, the data in grdC will be updated accordingly.
Problem is that the data in grdC is updated according to the selected row in grdA-band0.
The grids are bounded to the tables in that way:
bsA – hold the data of table A.
grdA.DataSource = bsA;
bsB.DataSource = bsA;
bsB.DataMember = "B";
bsC.DataSource = bsB;
bsC.DataMember = "C";
grdC.DataSource = bsC;
Thanks ahead,
Yael
Hi Yael,
Table C in your example here has no relation to table A.
I'm assuming you are using a DataSet here and you have tables A, B, and C in the same DataSet with relationships defined between tables A and B, and also between tables B and C.
What you need to do here is bind the second grid (grdC) to the Relationship (not the table) in your DataTable between tables B and C.
Hi Mike,
If I understand you right, this is what I did:
The relationship between B and C is bsC. I wrote:
Problem is that the data in grdC is updated according to the selected row in grdA-band0, but I want that it will be updated according to the selected row in grdA-band1.
Is it possible?
Thanks,Yael