Advertisement

07.30.2008 at 06:57AM PDT, ID: 23607314
[x]
Attachment Details

Populate datagridview from xml document

Asked by wiswalld in Microsoft Visual Basic.Net

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</RoundDate>
  <Hole1>7</Hole1>
  <Hole2>6</Hole2>
  <Hole3>5</Hole3>
  <Hole4>4</Hole4>
 </Holes>
 <Holes>
  <RoundDate>7/30/08</RoundDate>
  <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\NewRound.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
 
 
[+][-]07.30.2008 at 07:12AM PDT, ID: 22120583

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.30.2008 at 07:18AM PDT, ID: 22120634

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.30.2008 at 07:54AM PDT, ID: 22121019

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.30.2008 at 11:29AM PDT, ID: 22123210

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.30.2008 at 11:35AM PDT, ID: 22123264

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.31.2008 at 05:44AM PDT, ID: 22129090

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.31.2008 at 08:07AM PDT, ID: 22130402

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.31.2008 at 08:07AM PDT, ID: 22130406

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.31.2008 at 12:35PM PDT, ID: 22132817

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: VBRocks
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.31.2008 at 02:24PM PDT, ID: 22133671

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.01.2008 at 05:58AM PDT, ID: 22137766

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.01.2008 at 05:59AM PDT, ID: 22137776

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.01.2008 at 07:51AM PDT, ID: 22138821

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628