all groups > dotnet xml > march 2005 >
You're in the

dotnet xml

group:

parent child relations


parent child relations Jonathan Crawford
3/29/2005 6:57:39 PM
dotnet xml: Hi

I have an xml schema with a customer/order
master child relationship managed by a dataset

In the windows form I have the customer
fields bound to the customer node and
a datagrid for the orders

My problem is that the relationship in the
schema is not carried onto the form

I would be grateful for any pointers on this
as I am very stuck

thanks

Jonathan

--

===============
Jonathan Crawford
01273 440018
07799 068570
fax 01273 380221
jc@jcrawford.co.uk
===============

Re: parent child relations Mike Douglas
3/30/2005 8:49:48 PM
Hi,

I tried the same example and came up with the same results manually.
I had the customers bound to a listbox and handled the
SelectedIndexChange and changed the filter on the orders manually.
Here's the code.

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ListBox1.SelectedIndexChanged

Dim dataValue As String
Dim dr As DataRowView =
CType(ListBox1.Items(ListBox1.SelectedIndex), DataRowView)
dataValue = dr.Item("CustomerID")
DataGrid1.DataSource = co.Orders.Select("CustomerID = '" &
dataValue & "'")

End Sub

I wish it would have been automatic.

I hope this helps.

Mike Douglas
www.doitconsultants.com

On Tue, 29 Mar 2005 18:57:39 +0100, "Jonathan Crawford"
[quoted text, click to view]
AddThis Social Bookmark Button