Loading XML File to DataGrid

cheapshirt5

New Member
I have the XML File Below:\[code\]<?xml version="1.0"?><Devices> <Device Name="PS3" price="15" /> <Device Name="Wii" price="25" /> <Device Name="XBox" price="25" /></Devices>\[/code\]I've created a \[code\]DataSet\[/code\] inside my application that should be reading the content of the XML file.Here is my \[code\]XAML\[/code\] code:\[code\]<TabControl Height="311" HorizontalAlignment="Left" Name="tabControl1" VerticalAlignment="Top" Width="503"> <TabItem Header="All Clients" Name="allData"> <DataGrid AutoGenerateColumns="False" Height="279" Name="dataGrid2" Width="493"> <DataGrid.Columns> <DataGridTextColumn Header="Location" /> <DataGridTextColumn Header="Device" /> <DataGridTextColumn Header="Start Time" /> <DataGridTextColumn Header="End Time" /> <DataGridTextColumn Header="Edit" /><!-- This will be a button --> </DataGrid.Columns> </DataGrid> </TabItem></TabControl>\[/code\]The edit will have a button to be used to edit the whole row (This will be another window that will be used to edit)The problem now, I've tried to load the data to the DataGrid but I failed in doing that.
 
Back
Top