Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello, the code displayed is :

Imports System.Xml

Imports System.Data

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim xmlFile As XmlReader

        xmlFile = XmlReader.Create("Product.xml", New XmlReaderSettings())

        Dim ds As New DataSet

        ds.ReadXml(xmlFile)

        DataGridView1.DataSource = ds.Tables(0)

    End Sub

End Class


The problem is that it is only displaying the table , how to display all data within the table??
Posted
Updated 10-Feb-13 6:42am
v2
Comments
Sergey Alexandrovich Kryukov 10-Feb-13 8:40am    
Just do some more work. You did not even try anything. Read all the file...
—SA
CHill60 10-Feb-13 12:41pm    
See my reply comment to your original post of this http://www.codeproject.com/Answers/542999/HowplustoplusdisplayplusdataplusfromplusXMLplusfil?cmt=395594#cmt2_542999

1 solution

You can view all the data if you bind to the dataset:
VB
DataGridView1.DataSource = ds
 
Share this answer
 
Comments
virajdaw 11-Feb-13 2:08am    
Don't work, it does not display anything ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900