I'm making my first steps with XML and binding data to DataGridView
I have a XML file
<root>
<setting id="1">
<name1>val1</name1>
<name2>val2</name2>
<name3>val3</name3>
</setting>
<setting id= "2">
<name1>val1</name1>
<name2>val2</name2>
<name3>val3</name3>
</setting>
<setting id= "3">
</setting>
</root>
But what I get is
name1 name2 name3
val1 val2 val3
val1 val2 val3
...
What I want is
name1 val1
name2 val2
name3 val3
what I did till now is
//...
DataGridView1.DataSource = PopulateDataGrid();
//...
public DataTable PopulateDataGrid()
{
DataSet dataSet = new DataSet();
dataSet.ReadXml(SettingsXMLPath);
return dataSet.Tables[0];
}
when I run the code it makes rows for each block
what I'm I missing here ?