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

Typed Dataset heirarchy problem

I have a typed dataset with a root element - InstrumentSet with a collection
of Instruments. Each instrument has a Comment, a Name, a SourceCode block,
and a collection of Parameters. Like so:

<InstrumentSet>
<Instrument>
<Comment>xxx</Comment>
<Name>myName</Name>
<SourceCode>myCode</SourceCode>
<Parameter>
<P1>aaa</P1>
<P2>bbb</P2>
</Parameter>
</Instrument>
</InstrumentSet>

I'm using databindings to hold the instrument name, comment and sourcecode
in text boxes. I want to use a datagrid to hold a list of Parameters for
each Instrument but I can't quite figure out how to drill down to the
Parameter table for each Instrument. I tried variations on the following:

txtName.DataBindings.Add(new Binding("Text", instrumentSet,
"Instrument.Name"));

txtComment.DataBindings.Add(new Binding("Text", instrumentSet,
"Instrument.Comment"));

txtSourceCode.DataBindings.Add(new Binding("Text", instrumentSet,
"Instrument.SourceCode"));

dgParameters.DataSource = instrumentSet;

this.bmInstruments = this.BindingContext[instrumentSet, "Instrument"];

I can't figure out what the correct dgParameters.DataSource statement should
be. Can someone help?
Nov 16 '05 #1
2 1060
Bob

On 14-Oct-2004, "Chuck Bowling" <ch**********@sbcglobal-NO-SPAM.net> wrote:
I have a typed dataset with a root element - InstrumentSet with a
collection
of Instruments. Each instrument has a Comment, a Name, a SourceCode block,

and a collection of Parameters. Like so:

<InstrumentSet>
<Instrument>
<Comment>xxx</Comment>
<Name>myName</Name>
<SourceCode>myCode</SourceCode>
<Parameter>
<P1>aaa</P1>
<P2>bbb</P2>
</Parameter>
</Instrument>
</InstrumentSet>


Yeah, I ran into the same wall. You're better off using XPath.
Nov 16 '05 #2
Thanks Bob. I was thinking the same thing but had already comitted to what I
have now. Lots of code is going to need changing. ;)

"Bob" <bo*@bob.net> wrote in message
news:6k*****************@newssvr19.news.prodigy.co m...

On 14-Oct-2004, "Chuck Bowling" <ch**********@sbcglobal-NO-SPAM.net>
wrote:
I have a typed dataset with a root element - InstrumentSet with a
collection
of Instruments. Each instrument has a Comment, a Name, a SourceCode
block,

and a collection of Parameters. Like so:

<InstrumentSet>
<Instrument>
<Comment>xxx</Comment>
<Name>myName</Name>
<SourceCode>myCode</SourceCode>
<Parameter>
<P1>aaa</P1>
<P2>bbb</P2>
</Parameter>
</Instrument>
</InstrumentSet>


Yeah, I ran into the same wall. You're better off using XPath.

Nov 16 '05 #3

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

Similar topics

0
by: Natehop | last post by:
I've been attempting to design an n-tiered framework leveraging .NET's strongly typed Dataset. My Framework will serve as the foundation to several client apps from Windows applications to web...
2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
1
by: Job Lot | last post by:
I am confused how strongly typed dataset is different from un-typed dataset. Is there any good link explaining pros and cons of both? Which one should be used preferably?
1
by: Linesh Gajera | last post by:
Hi Guys i having the same problem with Strongly typed dataset, I have created a stronsetly typed dataset by draging table from Server explorer and now i have retreived xml from SQL server 2000...
1
by: Nedu N | last post by:
Hi All, I am facing problem in copying content of table from a untyped dataset into to a table inside the typed dataset. I wanted to copy the data into typed dataset in order to ease the further...
0
by: Chuck Bowling | last post by:
I have an XML Schema that's similar to the abbreviated version below; my problem is that both the XML designer in VS 2002 and xsd.exe apparently ignore the heirarchy that the Schema defines. In the...
1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
3
by: Freeon | last post by:
Hi, I am looking for a way to sort a strong typed dataset. It would seem the most straightforward way is to use a dataview. The only problem is when I use the dataview I seem to loose the strong...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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.