Bind Nested Table from DataSet

G

Guest

We're trying to bind a nested table from a DataSet that is loaded form XML
that looks like this:

<RootNode>
<RootRecords>
<ChildsNode>
<ChildRecords>

The table we're trying to display is the 'ChildsNode'. We seem to be able
to bind successfully, but the DataGrid displays this hierarchical thing that
we don't want. All we would like to see is the table - just rows and
columns, no hierarchy.

Here's what we're currently doing that doesn't work the way we want:

DataSet aSet = new DataSet();
aSet.ReadXml( path );
DataTable aTable = aSet.Tables["ChildsNode"]

Is there anyway to bind to the ChildsNode without displaying the full
hierarchy - just the rows and columns from 'ChildsNode'?

- Thanks
 
K

Ken Tucker [MVP]

Hi,

Maybe this will help
www.onteorasoftware.com/downloads/multigrids.zip

Ken
----------------------
We're trying to bind a nested table from a DataSet that is loaded form XML
that looks like this:

<RootNode>
<RootRecords>
<ChildsNode>
<ChildRecords>

The table we're trying to display is the 'ChildsNode'. We seem to be able
to bind successfully, but the DataGrid displays this hierarchical thing that
we don't want. All we would like to see is the table - just rows and
columns, no hierarchy.

Here's what we're currently doing that doesn't work the way we want:

DataSet aSet = new DataSet();
aSet.ReadXml( path );
DataTable aTable = aSet.Tables["ChildsNode"]

Is there anyway to bind to the ChildsNode without displaying the full
hierarchy - just the rows and columns from 'ChildsNode'?

- Thanks
 
G

Guest

Thanks for your reply.

Actually, it turns out to be much simpler than that.

All we needed to do was to specify "ChildRecords" for the binding, rather
than ChildsNode, and it works as we expected.
 

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