473,324 Members | 2,535 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,324 software developers and data experts.

ParentCol N ChildCol

Hello, I have a dataset1which contains 2 datatables, and add a datarelation between these 2 datatables, table1 and table2. The parentcol and childcol of this dataset1 are linked with column 'Num'. I've got a DataGrid control in form1 with data source is the parent table(table1) and another DataGrid control in form2 which its data source is also the parent table but data member is the child table(table2 in dataset1). How can I retrieve the related data of the child table display in DataGrid within the Form2 after a selection is made from DataGrid Form1?
E.g. Database : Sql server 2000
ParentTable's columns : Num, Name, Address
ChildTable's columns: Num, Order, Date
DataGrid in Form1 : parentTable as data source
DataGrid in Form2: ChildTable as data member
When a selection is made( e.g Num = 3), then should be retrieve all related data or row for Num = 3 only from ChildTable to display into DataGrid Form2 when a button is clicked.
Suppose i using BindingContext to make it?
Oct 25 '07 #1
1 827
debasisdas
8,127 Expert 4TB
Question moved to .NET Forum .
Oct 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Maarten | last post by:
hi all, i'm just trying to get a datagrid like this and can't find it anywhere +-parentrow(Analog Inputs) childrow (DA1) childrow (DA2) childrow (DA3) childrow (DA4) +-parentrow(Analog...
9
by: Christopher Weaver | last post by:
I've writtten the following (which compiles and runs). For some reason, TaskRows is always empty. DataRow TaskRows; foreach(DataRow TaskRow in dsTaskActivities.Tables.Rows) { TaskRows =...
8
by: Christopher Weaver | last post by:
I'm having the hardest time doing the simplest thing. I have a DataGrid bound to a table in a master detail DataRelation within a DataSet relTaskActivities = new DataRelation("TaskActivities",...
2
by: Josef Meile | last post by:
Hi, I'm using a ComboBox, some Textboxes, and a DataGrid to represent a many-to-many relationship between Person and Course. Each time that I change the value in the ComboBox (which for now is...
4
by: Jim in Arizona | last post by:
This doesn't make any sense to me. I'm hoping some SQL guru out there knows the answer. I'm making a help desk type database system. There's only two tables, one called TTickets and the other...
3
by: Jim in Arizona | last post by:
I'm going insane! I don't know if it's just that the .net 2.0 framework is buggy or if it really is my code. This is pretty hard to explain since I can't even begin to nail down why this is...
0
by: Jim in Arizona | last post by:
How could I dynamically create a button within a loop that holds a specific field from a database? I have a webform that loops through the records in related tables of an SQL database. I've been...
0
by: Mike Collins | last post by:
I am trying to export data from multiple tables in SQL Server to an XML file so I can then import it to another database. It seems to be working fine for exporting, but I am having trouble...
5
by: Mike Collins | last post by:
I am trying to export data from multiple tables in SQL Server to an XML file so I can then import it to another database. It seems to be working fine for exporting, but I am having trouble...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.