473,788 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested datagrids in windows forms (again)

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
3 1748
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.c om> 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
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
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.c om> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1412
by: Eddie B. | last post by:
Is it possible to do nested datagrids for Windows Forms?
2
945
by: DelphiBlue | last post by:
I have a Nested Datagrid that is using a data relations to tie the parent child datagrids together. All is working well with the display but I am having some issues trying to sort the child datagrid. HTML Datagrid1 TemplateColumn Table Header information Detail Information
10
3247
by: nimmi_srivastav | last post by:
Below you will see an example of a nested conditional expression that this colleague of mine loves. He claims that it is more efficient that a multi-level if-else-if structure. Moreover, our complexity analyzer tool supposedly does not pick it up. Is it really more efficient? Personally I find this coding style extremely cryptic, misleading and error-prone. I believe that I have removed all traces of proprietary-ness from this coding...
2
1430
by: Steve | last post by:
I would not have thought that getting a DataGrid connected to a DataSet (read in from an XML file) would be this complicated. I cannot get this to work. I have read everything I could find and modeled all the examples given but this grid just refuses to behave nicely. The code is listed below as well as the XML schema and XML data. The connection between the data set and grid seems to work just fine. What won't work is the display...
2
1319
by: OHM | last post by:
Windows Forms Controls. Has anyone personally read and recommends a good book which includes good coverage on DataGrids as this seems to be one of the most common problem areas. Regards - OHM
1
1166
by: Neil | last post by:
Does anyone know where there is some examples of nested datagrids in vb.net not using ASP.net or Does anyone know how to link using nested datagrids in vb.net not using ASP.net (eg where column 1 is a date and the column 2 is a datagrid that has transactions belonging to that date)
1
1546
by: tomb | last post by:
This is making me crazy! vb.net 2003 I have two datagrids, datasource is the same datatable. I need the first one to show only 2 columns, the second to show 99 columns. They also have to be in sync - if I resort one, the other must also resort. That's why I am not using dataviews. But this doesn't work. The second grid shows 99 columns, the first shows all 108. What gives? Please help?!?!
6
1758
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost datagrid's OnItemDataBound() method we check for the row in which it's appropriate to add the secondary datagrid. Exactly one row in the topmost grid will contain the secondary grid.
1
1158
by: tshad | last post by:
I am trying to find the differences between handling of DataGrids in Windows Forms and Asp.Net. They are completely different in how you bind to them, get number of rows, look at columns and rows, selecting rows, handling events, etc. I know how to handle them in Asp.net, but not as sure when dealing with DataGrids in a Windows Form. Where would I find some good articles on these?
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.