title: reverse asp.net grid view columns header into rows header
body: <p>I'm still learning asp.net and I want to ask you about how to reverse the grid view, I mean the default grid view would be like this </p>
  
  <p><img src="https://i.stack.imgur.com/mmBCr.png" alt="grid view with columns header"></p>
  
  <p>and this is the code for it:</p>
  
  <pre><code>        &lt;asp:GridView ID="GridView1" runat="server" EnableModelValidation="True" 
          AutoGenerateColumns="false" Width="256px"&gt;
          &lt;Columns&gt;
  
  
              &lt;asp:TemplateField HeaderText="1"&gt; &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="test1" runat="server" Text="test1"&gt;&lt;/asp:Label&gt;
                           &lt;/ItemTemplate&gt;&lt;/asp:TemplateField&gt;
  
              &lt;asp:TemplateField HeaderText="2"&gt; &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="test2" runat="server" Text="test2"&gt;&lt;/asp:Label&gt;
                           &lt;/ItemTemplate&gt;&lt;/asp:TemplateField&gt;
  
              &lt;asp:TemplateField HeaderText="3"&gt; &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="test3" runat="server" Text="test3"&gt;&lt;/asp:Label&gt;
                           &lt;/ItemTemplate&gt;&lt;/asp:TemplateField&gt;  &lt;/Columns&gt;
          &lt;RowStyle HorizontalAlign="Left" VerticalAlign="Bottom" /&gt;
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>and i want it to be like this picture :</p>
  
  <p><img src="https://i.stack.imgur.com/ScCrK.png" alt="enter image description here"></p>
  
  <p>the test here will be data bound and the numbers should be header text, this is only for test, is there a way to reverse it?</p>
  
  <p>thank you all for your valuable advises and efforts, I really appreciate it.</p>