Results 1 to 1 of 1

Thread: [RESOLVED] XML file to dataset to datagridview

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2007
    Location
    indiana
    Posts
    341

    Resolved [RESOLVED] XML file to dataset to datagridview

    I have the XML to data set part kinda working. the problem is that when i load the file to the data set the first row is fine but rows 2-11 don't have any data in them. (see dataFAIL.png) other than that data set works fine.

    code for loading DS
    Code:
            Dim xmlDatadoc As New XmlDataDocument()
    
            xmlDatadoc.DataSet.ReadXml("C:\Users\me\Desktop\XML Files\user002\user002_inv.xml", XmlReadMode.Auto)
    
            Dim ds As New DataSet("Paint DataSet")
            'Dim ds2 As New DataSet
            ds = xmlDatadoc.DataSet
    Now when i try to load my dataset into my datagridview nothing happens. i don't get and error and i don't get visible data.

    code for loading datagridview
    Code:
     'BindingSource1.DataSource = ds.Tables("paint")
            'BindingSource1.DataMember = "name"
            'DataGridView1.DataSource = ds.DefaultViewManager
            'ds2 = ds   'Me.BindingSource1
            DataGridView1.DataSource = ds.Tables("paint")
            DataGridView1.DataMember = "name"
    as you can see i have tried many things and no have worked. so i have come to you guys fro help. What is wrong with my code that is making this not work.

    NOTE: by the way the two sections of code above are all in the same button
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width