DataGrid: view XML data
-
Dear all, I got an XML like this: Aluis tungdt@ssi.com.vn 123456789 0983934645 IT11 ... here is code that I load XML to DataGrid:
private void loadData(string xmlsource) { try { // Initialize Component and other code here // Create an XmlDataDocument object and read an XML XmlDataDocument xmlDatadoc = new XmlDataDocument(); xmlDatadoc.DataSet.ReadXml(xmlsource); // Create a DataSet object and fill with the dataset // of XmlDataDocument this.colleagueList = new DataSet("Colleague List"); this.colleagueList = xmlDatadoc.DataSet; // Attach dataset view to the Data Grid control this.lstColleague.DataSource = this.colleagueList.DefaultViewManager; this.lstColleague.NavigateTo(0, "colleague"); } catch(Exception e) { throw e; } }
but all the attributes in node, and node were not showed. Please help me how to display all information in one view... Regards,