I have gone round and round with this for a while and I want to redesign my XML file. I want to design it like this but how do I populate the datagridview with the data. It only populates with the first 4 fields (Course, Tees, Slope and Rating). I should see two records (I think) with the same first 4 fields and different hole scores.
<?xml version="1.0" encoding="UTF-8"?>
<Round>
<Course>Delhi</Course>
<Tees>White</Tees>
<Slope>126</Slope>
<Rating>77</Rating>
<Holes>
<RoundDate>7/14/08</RoundD
ate>
<Hole1>7</Hole1>
<Hole2>6</Hole2>
<Hole3>5</Hole3>
<Hole4>4</Hole4>
</Holes>
<Holes>
<RoundDate>7/30/08</RoundD
ate>
<Hole1>7</Hole1>
<Hole2>6</Hole2>
<Hole3>5</Hole3>
<Hole4>4</Hole4>
</Holes>
</Round>
I am using this to populate the datagridview
Dim ds As New DataSet
ds.ReadXml("C:\DVADGOLF\Ne
wRound.xml
")
With Me.DataGridView1 'datagrid object on the form
.DataSource = ds.Tables(0)
End With
Before this I had a simple XML file with no subs (may not be the proper terminoligy)
If I should just leave this alone let me know.
Start Free Trial