private void Form_Load(object sender, EventArgs e) { XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml("C:\\path.xml"); DataSet ds = new DataSet("Sample"); ds = xmlDatadoc.DataSet; dataGridView1.DataSource = ds.DefaultViewManager; dataGridView1.DataMember = "Sample"; }
DataSet ds=new DataSet(); ds.ReadXml(Server.MapPath("people.xml")); Grid1.DataSource=ds; Grid1.DataBind();
DataSet ds = new DataSet(); try { ds.ReadXml(Server.MapPath("XMLfilename.xml")); if (ds != null && ds.HasChanges()) { Gridview1.DataSource = ds; Gridview1.DataBind(); } else { Gridview1.DataBind(); } } catch (Exception ex) { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)