programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Friday, April 15, 2016 Gridview displaying XML file data Gridview displaying XML file data:

In previous post I explained post relating to XML some of those are read xml file and bind data to grid view, xml data to dropdownlist or gridview in and how to insert and read data from xml in In situation I got requirement like read data from xml file and display it on webpage. My XML File Name as “SampleDemofor.xml” and that would contains data like this

Here is the xml file for binding data
        <Name>Adams John</Name>
        <Name>Mary Jane</Name>


The simplest possible solution is to load the XML into a DataSet and bind to that. Another solution would be to use XML serialization to create an object graph from the XML and bind to that. To bind to the raw XML, you would need to create wrapper classes that implement ITypedList, IBindingList, and ICustomTypeDescriptor.

Alternatively, you can try this..

 XmlReader xmlFile = XmlReader.Create("Xml_FilePath",new XmlReaderSettings());
 DataSet dataSet = new DataSet();


 dataGridView1.DataSource = dataSet.Tables["Employees"];


1 comment:

  1. your ASP related concepts thus it is really well done to a great job thus it is nice too and i got more information from your blog. i like this article and it is very well good too to practice the concepts.

    Online Reputation Management