Search:
Namespaces
Discussions
.NET v1.1
Feedback
Related DataGrids
Messages
Related Types
This message was discovered on
ASPFriends.com 'winforms-cs' list
.
Per Erik Lorentzen
A main table has a related child table, 1-many, and this child table =
again has a related child table, 1-many.
The dataset with relations, the dataadapters & the SQL stored procedures =
are all a-ok!
I bind the main table to controls in a form. I bind the first child to a =
datagrid. So far everything is also a-ok... Moving the current row in =
the main table causes datagrid1 to show all related records. But, when =
binding the second child table to a second datagrid, things don't work =
out as I planned.
My question is thus: How do I create a dataset & relations (&& events?) =
so that the second datagrid reflects the position of the pointer in the =
first datagrid. I.e., when moving the current row of datagrid1, =
datagrid2 should show the related records to that row.
Any help would be most appreciated!
Med hilsen
Per Erik Lorentzen
SK Data as
Click here to reveal e-mail address
Reply to this message...
Mark Boulter
Given DataSet1 Contains Customers, Orders, OrderItems with Customers
related to order with a relation called C_O and Orders to OrderItems
with a relation called O_OI
Setup DataGrid1 so that=20
Datasource =3D DataSet1
DataMember =3D "Customers"
Setup DataGrid2 so that=20
Datasource =3D DataSet1
DataMember =3D "Customers.C_O"
Setup DataGrid2 so that=20
Datasource =3D DataSet1
DataMember =3D "Customers.C_O.O_OI"
And it will just work=20
Mark
-----Original Message-----
From: Per Erik Lorentzen [mailto:
Click here to reveal e-mail address
]=20
Sent: Thursday, May 23, 2002 8:37 AM
To: winforms-cs
Subject: [winforms-cs] Related DataGrids
A main table has a related child table, 1-many, and this child table
again has a related child table, 1-many.
The dataset with relations, the dataadapters & the SQL stored procedures
are all a-ok!
I bind the main table to controls in a form. I bind the first child to a
datagrid. So far everything is also a-ok... Moving the current row in
the main table causes datagrid1 to show all related records. But, when
binding the second child table to a second datagrid, things don't work
out as I planned.
My question is thus: How do I create a dataset & relations (&& events?)
so that the second datagrid reflects the position of the pointer in the
first datagrid. I.e., when moving the current row of datagrid1,
datagrid2 should show the related records to that row.
Any help would be most appreciated!
Med hilsen
Per Erik Lorentzen
SK Data as
Click here to reveal e-mail address
| [winforms-cs] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/winforms-cs.asp
=3D JOIN/QUIT
Reply to this message...
Per Erik Lorentzen
Thanks a lot, Mark!
I'd been twisting my head round this problem, but now I see, naturally, =
that the relation in the second grid has to be based on the main =
relation - not on the first child table as I had done...
It worked just smoothly!
Thanks again.
Med hilsen
Per Erik Lorentzen
SK Data as
Click here to reveal e-mail address
----- Original Message -----=20
From: "Mark Boulter" <
Click here to reveal e-mail address
>
To: "winforms-cs" <
Click here to reveal e-mail address
>
Sent: Thursday, May 23, 2002 8:09 PM
Subject: [winforms-cs] RE: Related DataGrids
[Original message clipped]
Reply to this message...
Mark Boulter
No problem
-----Original Message-----
From: Per Erik Lorentzen [mailto:
Click here to reveal e-mail address
]=20
Sent: Thursday, May 23, 2002 11:20 AM
To: winforms-cs
Subject: [winforms-cs] RE: Related DataGrids
Thanks a lot, Mark!
I'd been twisting my head round this problem, but now I see, naturally,
that the relation in the second grid has to be based on the main
relation - not on the first child table as I had done...
It worked just smoothly!
Thanks again.
Med hilsen
Per Erik Lorentzen
SK Data as
Click here to reveal e-mail address
----- Original Message -----=20
From: "Mark Boulter" <
Click here to reveal e-mail address
>
To: "winforms-cs" <
Click here to reveal e-mail address
>
Sent: Thursday, May 23, 2002 8:09 PM
Subject: [winforms-cs] RE: Related DataGrids
[Original message clipped]
| [winforms-cs] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/winforms-cs.asp
=3D JOIN/QUIT
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com