Hello,
Has anybody tried binding to an xml data source that contains hierarchy data, e.g. :
<?xml version="1.0" encoding="utf-8" ?><advgrid> <customer> <name>James Brook</name> <address>32 High St</address> <email>jamie.brook@gmail.com</email> <subCustomers> <name>Sub Paul</name> <address>Sub Address</address> <email>sub@cust.com</email> </subCustomers> </customer> <customer> <name>Helen Clark</name> <address>564 Beehive Road</address> <email>Helen@clark.com</email> </customer> <customer> <name>Rodger Wilco</name> <address>1 North Ave</address> <email>rodger@wilco.com</email> </customer> <customer> <name>Charles Barkley</name> <address>6 Basketball Road</address> <email>charles@barkley.co.nz</email> </customer></advgrid>
You can see against the first customer node there is a sub customer node attached, but this does not render as expected. For some reason XamDataGrid thinks each node inside the sub customer node is an individual row. I have attached a screen shot showing how this is rendered.
Is there something else I should be doing or have missed, or is this a bug?
James
Thanks very much, that did the trick :)
Cheers
Have you tried placing the data in the SubCustomers tag into a Customer tag?
<customer> <name>James Brook</name> <address>32 High St</address> <email>jamie.brook@gmail.com</email> <subCustomers> <customer> <name>Sub Paul</name> <address>Sub Address</address> <email>sub@cust.com</email> </customer> </subCustomers> </customer>
It looks like the data grid is assuming that the SubCustomers tag will display a list of records.
Thanks,