Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Load a DataGrid Contol with XML Data using ADO.NET

Total Hit ( 1403)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


You will need to create a new Form, and then add three controls to it. A Button called btnImportXML, a DataGrid called DataGrid and a TextBox called txtPath.

Run the project and type the complete path to your XML document in the Textbox then click the Button. The DataGrid will be loaded with your XML Information.

Click here to copy the following block
Imports System.Data
Imports System.Data.ADO

Protected Sub btnImportXML_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim objXMLDataSet As New DataSet("XMLDataSet")
    Dim objXMLDOM As New System.Xml.XmlDocument()
    
    objxmldom.Load(txtPath.Text)
    
    objXMLDataSet.ReadXml(txtPath.Text)
    
    DataGrid.DataSource = objXMLDataSet
End Sub


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.