473,320 Members | 1,993 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,320 software developers and data experts.

Datarelation problem

77
I have a child and parent condition on my datagrid.
When the parent have child + will be shown beside the name of parent. The problem is when user click on the + sign another row will be shown which contains the name of the Datarelation I used in my code.

Then they should click on that name to see child rows. How can I make it straight forward?
I mean when user click on + they see child rows.
Aug 15 '08 #1
1 1188
Sep410
77
Here is more information about the peroblem.:
da1.Fill(ds, "Parent")
da2.Fill(ds, "Child")
Dim DataRelation As New DataRelation("Family", ds.Tables("Parent").Columns("CaseID"), ds.Tables("Child").Columns("CaseID"), False)
ds.Relations.Add(DataRelation)
Dim dv As New DataView(ds.Tables("Parent"))
PublicDS = ds

dgSearch.DataSource = dv

'-----------datagrid
Try
dts1.MappingName = "Parent"
dgSearch.TableStyles.Add(dts1)
dgSearch.TableStyles(0).GridColumnStyles(0).Width( ) = 0
dgSearch.TableStyles(0).GridColumnStyles(4).Width( ) = 0
Catch ex As Exception

End Try

The problem is I will see the relation’s name(Family) when I click at the + beside parent name and I should click on that name and then I can see the child.
I need to see child when I click on +.

Please help me.
Aug 19 '08 #2

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

Similar topics

1
by: yaser | last post by:
Hello: I need save my update but i can't :confused: :confused: :confused: look my code : Imports System.Data Imports System.Data.OleDb Public Class Form1
0
by: Stefan | last post by:
I need help with the following problem. I created a datarelation DataRelation oRelation = new DataRelation("plz_relation",odsAdressenDS.v_plz.plz_idColumn,...
0
by: Paul | last post by:
Hi, I think there's a bug in the ComoBox when binding to a DataRelation. The problem is that SelectedValueChanged event is not always being called. Here is some code to reproduce the problem....
0
by: Fox | last post by:
Is it possible to get back the DataRelation contect from a dataSet? { DataRelation myDataRelation; DataColumn parentColumn; DataColumn childColumn; parentColumn = myDataSet.Tables.Columns;...
2
by: Christopher Weaver | last post by:
I've filled a DataSet with two tables then established a DataRelation; all is well because the backend includes RI rules that ensure that no record on the detail side will be without a master...
0
by: mazda_88 | last post by:
I have a number of tables inside a dataset. I have a repeater that I need to bind to. The data that is needed resides in two tables in the dataset. Here is the code that I'm using: Dim...
2
by: Jonathan | last post by:
Hi, I have two table (Business and Contacts) for which I would like to create a DataRelation. The problem is that the Foreign key field cannot be null. So the code throws an exception when trying...
2
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows...
6
by: Aryan | last post by:
Hi, I want to use DataRelation object for setting up relationship between two different datatable, but i want to use multiple columns to set up relation between two tables. For example. ...
2
by: Tony Johansson | last post by:
Hello! I can't understand what is this table DataRelation used for. I mean as long as you have this DataTable I can't see any point in using this DataRelation. //Tony
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
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.