XML Data binding?

D

Dan

Is there a way to bind a top level element in an xml file to a combobox, and
then reveal the child elements in a datagrid?

I'm trying to store menu items (ie: their names) in the combobox, and then
retrieve the results in the datagrid. Now, the datagrid needs to hold the
name of ingredient and the cost of ingredient. So two columns. I'm really
new to C# and .NET so speak sloooooooooooowly! : )
 
M

Michael Nemtsev

Hello "Dan"(e-mail address removed),

Look at XmlDataDocument.
Using XPath u get planar data and seems that u can use it in your case
Is there a way to bind a top level element in an xml file to a
combobox, and then reveal the child elements in a datagrid?

I'm trying to store menu items (ie: their names) in the combobox, and
then retrieve the results in the datagrid. Now, the datagrid needs to
hold the name of ingredient and the cost of ingredient. So two
columns. I'm really new to C# and .NET so speak sloooooooooooowly! :
)
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
D

Dan

I'm still having some problems with my master/detail app. Does anyone know
of any examples out there where an actual XML file is used and then a
combobox grabs the parent nodes and a datagrid displays the details of
'selected' parent node (selected in the combobox of course)?

This has to have been done somewhere. I know that microsoft has a number of
tutorials out there that illustrate how to create master/detail apps via SQL
Server databases but I'm trying to do the same with an xml file and it's
killing me here!

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top