title: How to set class for thead element in a gridview?
body: <p>I am trying to set <code>THEAD</code> Class for GridView and I came as close as having a <code>Thead</code> element without Class property and have class name I want to tr element. The reason is because PDF generator will look for a thead class name and generate table header on each page. PDF generator has problem rendering javascript sometimes so I prefer pure html and css on the page. </p>
  
  <p><strong>Code behind apart from databind.</strong></p>
  
  <pre><code>GridView1.HeaderRow.TableSection = TableRowSection.TableHeader
  </code></pre>
  
  <p><strong>Aspx</strong></p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" HeaderStyle-CssClass="table-header-group"&gt;
  &lt;Columns&gt;
      &lt;asp:BoundField DataField="Forename" HeaderText="Forename" ItemStyle-Width="150" ItemStyle-CssClass="iClass" /&gt;
      &lt;asp:BoundField DataField="Surname" HeaderText="Surname" ItemStyle-Width="150" ItemStyle-CssClass="iClass" /&gt;
  &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p><strong>Generated HTML</strong></p>
  
  <pre><code>&lt;table class="gvPrinting" cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;"&gt;
      &lt;thead&gt;
          &lt;tr class="table-header-group"&gt;
              &lt;th scope="col"&gt;Forename&lt;/th&gt;&lt;th scope="col"&gt;Surname&lt;/th&gt;&lt;th scope="col"&gt;DOB&lt;/th&gt;&lt;th scope="col"&gt;Session Name&lt;/th&gt;&lt;th scope="col"&gt;Password&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;&lt;tbody&gt;
          &lt;tr&gt;
              &lt;td colspan="5"&gt;+++&lt;/td&gt;
          &lt;/tr&gt;&lt;tr&gt;
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>     &lt;thead class="table-header-group"&gt;
  </code></pre>