By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,641 Members | 1,446 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,641 IT Pros & Developers. It's quick & easy.

Nested datagrids in windows forms (again)

P: n/a
I know this has been asked before but I have not seen it
answered. How would one implement nested datagrids in
windows forms based on the table relationships within a
dataset? Or, is there some setting that lets you
automatically display the details table (instead of the
relationship name) on the new expanded row of a datagrid?
I have seen it for ASP.NET, but is this doable for windows
forms?

Thanks in advance,
John
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Sort of.

If you create a relationship between say Order and OrderDetails table ( 1 to
many ), where OrderDetails has the foreign key. Then by default this will
show with navigation controls in a DataGrid, when you expand the order the
details will show.
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"John Jasobs" <jb******@msn.com> wrote in message
news:2b*****************************@phx.gbl...
I know this has been asked before but I have not seen it
answered. How would one implement nested datagrids in
windows forms based on the table relationships within a
dataset? Or, is there some setting that lets you
automatically display the details table (instead of the
relationship name) on the new expanded row of a datagrid?
I have seen it for ASP.NET, but is this doable for windows
forms?

Thanks in advance,
John

Nov 20 '05 #2

P: n/a
When you expand, the relationship name shows as a link.
You then have to click on that link to get to the detail
table. Is there a way to bypass that intermediate step.
Have the detail grid displayed in the row of a master grid
(nested grids). In windows forms, keep in mind.
-----Original Message-----
Sort of.

If you create a relationship between say Order and OrderDetails table ( 1 tomany ), where OrderDetails has the foreign key. Then by default this willshow with navigation controls in a DataGrid, when you expand the order thedetails will show.

Nov 20 '05 #3

P: n/a
Not in the same grid, however, you can have a secondary grid bound to the
relation, this way the master selected row changes, so do the children
displayed in the details.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"John Jasobs" <jb******@msn.com> wrote in message
news:2b*****************************@phx.gbl...
When you expand, the relationship name shows as a link.
You then have to click on that link to get to the detail
table. Is there a way to bypass that intermediate step.
Have the detail grid displayed in the row of a master grid
(nested grids). In windows forms, keep in mind.
-----Original Message-----
Sort of.

If you create a relationship between say Order and

OrderDetails table ( 1 to
many ), where OrderDetails has the foreign key. Then by

default this will
show with navigation controls in a DataGrid, when you

expand the order the
details will show.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.