title: How to load TreeView Serialization into GridView
body: <p>From a TreeView, I get this XML serialized:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;node text="&amp;lt;span id='c6f5ab9e-d08f-448a-9143-02d174317c07' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Zürich&amp;lt;/span&amp;gt;" value="c6f5ab9e-d08f-448a-9143-02d174317c07" navigateurl="" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False"&gt;  &lt;node text="&amp;lt;span id='f28df8d9-f83f-494c-a88e-591c7266c455' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Gebäude 1&amp;lt;/span&amp;gt;" value="f28df8d9-f83f-494c-a88e-591c7266c455" navigateurl="" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False"&gt;    &lt;node text="&amp;lt;span id='e8cd5ca3-e25c-4900-b49e-53a5a6b0f19a' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Etage 1&amp;lt;/span&amp;gt;" value="e8cd5ca3-e25c-4900-b49e-53a5a6b0f19a" navigateurl="" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False"&gt;      &lt;node text="&amp;lt;span id='31360723-0be2-47e5-814c-4837c174c9a1' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Raum 203&amp;lt;/span&amp;gt;" value="31360723-0be2-47e5-814c-4837c174c9a1" navigateurl="javascript:SetUrl('./raumplaner.aspx?raum=31360723-0be2-47e5-814c-4837c174c9a1');" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False" /&gt;      &lt;node text="&amp;lt;span id='5accd32f-7a85-46de-99a3-0853843b4e99' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Raum 211&amp;lt;/span&amp;gt;" value="5accd32f-7a85-46de-99a3-0853843b4e99" navigateurl="javascript:SetUrl('./raumplaner.aspx?raum=5accd32f-7a85-46de-99a3-0853843b4e99');" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False" /&gt;      &lt;node text="&amp;lt;span id='67774365-233b-4176-93f4-65c4e4953daa' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Raum 511&amp;lt;/span&amp;gt;" value="67774365-233b-4176-93f4-65c4e4953daa" navigateurl="javascript:SetUrl('./raumplaner.aspx?raum=67774365-233b-4176-93f4-65c4e4953daa');" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False" /&gt;      &lt;node text="&amp;lt;span id='ea86389f-b6ef-433e-97da-e3395f216ee5' oncontextmenu=&amp;quot;SetContextMenu(this.id, event);return false;&amp;quot; &amp;gt;Raum 4&amp;lt;/span&amp;gt;" value="ea86389f-b6ef-433e-97da-e3395f216ee5" navigateurl="javascript:SetUrl('./raumplaner.aspx?raum=ea86389f-b6ef-433e-97da-e3395f216ee5');" populateondemand="False" showcheckbox="false" checked="False" expanded="True" selected="False" /&gt;    &lt;/node&gt;  &lt;/node&gt;&lt;/node&gt;
  </code></pre>
  
  <p>Now I want to read all the nodes into a gridview
  So I use a XMLdatasource, point it to the XML file, and have it bind data to the gridview.</p>
  
  <p>The problem is, because it's a navigation structure with folders and subfolders, containing items, it only loads the first folder, and nothing else.</p>
  
  <p>The gridview: `
          
         
      </p>
  
  <pre><code>            &lt;asp:GridView ID="GridView1" DataSourceID="xmldsDefaultMenu" runat="server" AutoGenerateColumns="false"&gt;
       &lt;Columns&gt;
              &lt;asp:BoundField ReadOnly="True" 
                HeaderText="Name" 
                InsertVisible="False" 
                DataField="text" 
                SortExpression="ProductID"&gt;
              &lt;/asp:BoundField&gt;
  
              &lt;asp:BoundField HeaderText="ID" 
                DataField="value" 
                SortExpression="ProductName"&gt;
              &lt;/asp:BoundField&gt;
  
              &lt;asp:BoundField HeaderText="URL" 
                  DataField="navigateurl" 
                  SortExpression="QuantityPerUnit"&gt;
              &lt;/asp:BoundField&gt;
          &lt;/Columns&gt;        
      &lt;/asp:GridView&gt;
  `
  </code></pre>
  
  <p>The treeview:</p>
  
  <pre><code>            &lt;asp:TreeView ID="TreeView1" Runat="server" DataSourceID="XmlDataSource1" ImageSet="Arrows" &gt;
                  &lt;HoverNodeStyle    BackColor="#D7E8F3" BorderColor="#A7B4CE" Font-Underline="false" /&gt;
                  &lt;SelectedNodeStyle ForeColor="#FF0000" BackColor="#FAF3F4" BorderColor="#A7B4CE" Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px" /&gt;
  
                  &lt;DataBindings&gt;
                       &lt;asp:TreeNodeBinding DataMember="node" TextField="text" ValueField="value" PopulateOnDemand="false" NavigateUrlField="navigateurl" &gt;
                      &lt;/asp:TreeNodeBinding&gt;
                  &lt;/DataBindings&gt;
              &lt;/asp:TreeView&gt;   
  </code></pre>