Hi All, I have a xml as shown below
<Devices>
<Device>
<DeviceId>0</DeviceId>
<Axes>
<Axis>
<Name>Robot Z</Name>
<CS>0</CS>
.
.
.
</Axis>
.
.
<Axes>
</Device>
<Device>
<DeviceId>1</DeviceId>
<Axes>
<Axis>
<Name>Table X</Name>
<CS>0</CS>
.
.
.
</Axis>
.
.
<Axes>
</Device>
<Device>
<DeviceId>2</DeviceId>
<Axes>
<Axis>
<Name>Table X</Name>
<CS>0</CS>
.
.
.
</Axis>
<Axes>
</Device>
</Devices>
I would like to display the "Axis" nodes in a data grid depending on the
DeviceId selected by the user.
I created a DataSet object and using its ReadXml method.
myDataSet.ReadXml("MachineConfig.xml");
// datagridAxisInfo.DataSource = myDataSet; // works but shows
all axis nodes
datagridAxisInfo.DataMember = "Axis";
datagridAxisInfo.CaptionText = datagridAxisInfo.DataMember;
When I replaced the second line with
datagridAxisInfo.DataSource = myDataSet.Tables[0]
I get a error message saying that it cannot create a child list for
field axis.
How can I navigate to the Axis node for the particular device ?
Thanks in advance.
Regards
Aman
===================================
This list is hosted by DevelopMentor� http://www.develop.com
Some .NET courses you may be interested in:
NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
