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, -
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,You might try the XML/XSL forum. This is the Lounge. :doh:
I may be Green, but at least I'm environmentally friendly.
-
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,I'm suprised you can read the XML code. It's obvious you can not read the admonishment against posting programming questions the lounge forum.
“If we are all in agreement on the decision - then I propose we postpone further discussion of this matter until our next meeting to give ourselves time to develop disagreement and perhaps gain some understanding of what the decision is all about.”-Alfred P. Sloan
-
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,Programming questions are a no-no in the Lounge.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
-
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,1
ROFLOLMFAO