473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using 2 DataGrids

I am looking for working examples of making use or 2 datagrids and one dataset

Grid 1 master Display minimul info
Grid 2 slave. Disply detail info

When the user clicks a row on the master I then load Grid 2 with detail information.

Thanks for any help

B
Nov 20 '05 #1
3 1206
Cor
Hi Brian,

Did you already look at the master detail form sample in the recourse kit?

http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

I thought it goes far in the direction of your question.

Cor
Nov 20 '05 #2
BB
Hello,

There are a number of examples out there in the VS.NET on-
line help, but here's a pretty good one: *Walkthrough:
Creating a Master-Detail Windows Form*. It uses a
datagrid and a listbox, but the idea is the same.

You build the master/slave datatables, then build the
datarelation. You bind table 1 to datagrid 1
(setbindings), but instead of binding datagrid 2 to the
child table you *bind it to the datarelation*.

For example, table 1 is OrderHeader and table 2 is
OrderDetail. You build the datarelation on OrderID and
name that relation "OrderRelation". Bind datagrid 1
to "OrderHeader" and datagrid 2
to "OrderHeader.OrderRelation", and you're good to go.
If you bind grid 2 to the child table, even with the
relation set, you'll just get two unrelated grids.

One other thing: there's a property on the datagrid
called AllowNavigation. If that's true (default), then
you get plus signs on the parent grid, which you can
expand to view the child details right in the parent
grid. Cool, but can also be annoying--I think like you
that using the two grids is a better approach.

There's also a great book out there, ADO.NET Cookbook
(O'Reilly), that talks about your case in detail, along
with tons of other how-to's that you don't get as simply
from the on-line docs.

hth,

Bill Borg
-----Original Message-----
I am looking for working examples of making use or 2 datagrids and one dataset
Grid 1 master Display minimul info
Grid 2 slave. Disply detail info

When the user clicks a row on the master I then load Grid 2 with detail information.
Thanks for any help

B
.

Nov 20 '05 #3
OK well I tried install the Vb.Net ket but it will not work.

I am using ONE dataset with 2 datagrids. All the data I need is in the one dataset however, one row of data is so long I want to split it up into 2 grids so the user can see all informatiuon without scrolling to the right. I am trying to sync them up.

Thanks
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
2
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...
1
by: Dave | last post by:
I have a datagrid with another datagrid in a template column. For the second datagrids datasource I use container.dataitem.createchildview("relationship") I want to discover if the nested...
4
by: ree32 | last post by:
I have a placeholder and depending on a user input(a drop downlist) when the user clicks a button I dynamically create a number of datagrids and fill them with data from a database. But the problem...
0
by: Scott Meddows | last post by:
I'm having trouble scrolling some datagrids so they sync up... I have two identical datagrids on a form, filled with eh same dataset. I want a user to be able to scroll on the datasets and the...
4
by: | last post by:
Hello. In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
3
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Jim | last post by:
OK here's my disclaimer: I'm very new to ASP.NET and posting on Google Groups, so please bear with me and feel free to correct either the way I code or the way I post. I have an ASP.NET page...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...

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.