DataGridView+XML+VB.NET

Mohsin

New member
Joined
Jun 19, 2007
Messages
2
Programming Experience
1-3
Hello experts
I have a simple problem but im not able to figure it out. I have a simple XML file and Im using DataGridView in VB.NET 2005. I want to load the XML fie data in DataGridView. But its does not load. I need your help urgently. Below is my xml file and CODe


VB.NET:
<xml>
<node id=1>
<name>myname</name>
<place>country</place>
</node>
</xml>


VB.NET:
Dim ds As New DataSet

ds.ReadXml("C:\docs\atms.xml")
grid1.DataSource = ds
PLEASE HELP!!!
 
Last edited by a moderator:
VB.NET:
grid1.DataSource = ds.Tables(0)
the xml file need to be fixed:
HTML:
<node id="1">
 
Back
Top