title: ASP.NET GridView Newbie Questions About TFOOT and TH
body: <p>Greetings!</p>
  
  <p>I'm still learning about the GridView control and I have one bound to an ObjectDataSource.  My Web form looks like this:</p>
  
  <pre><code>&lt;asp:GridView ID="ourGrid" runat="server" DataSourceID="ourDataSource" onrowdatabound="ourGrid_RowDataBound"
                HeaderStyle-CssClass="header_style" AlternatingRowStyle-CssClass="altrow_style"
                ShowFooter="true"&gt;
      &lt;columns&gt;
      &lt;asp:BoundField DataField="Name" HeaderText="Full Name" /&gt;
      &lt;asp:BoundField DataField="Gender" HeaderText="Gender" /&gt;
      &lt;asp:BoundField DataField="BirthYear" HeaderText="Year of Birth" /&gt;
      &lt;asp:BoundField DataField="JoinDate" HeaderText="Date Joined" HtmlEncode="false" DataFormatString="{0:d}" /&gt;
    &lt;/columns&gt;
  &lt;/asp:GridView&gt;
  &lt;asp:ObjectDataSource ID="ourDataSource" runat="server" SelectMethod="GetTopUsers" TypeName="Acme.Model.OurNewObject"&gt;
  &lt;/asp:ObjectDataSource&gt;
  </code></pre>
  
  <p>It currently generates the following markup:</p>
  
  <pre><code>&lt;table cellpadding="0" cellspacing="0" summary=""&gt;
      &lt;thead&gt;
          &lt;tr style="header_style"&gt;
              &lt;th scope="col"&gt;Full Name&lt;/th&gt;
              &lt;th scope="col"&gt;Gender&lt;/th&gt;
              &lt;th scope="col"&gt;Year of Birth&lt;/th&gt;
              &lt;th scope="col"&gt;Date Joined&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  
      &lt;tfoot&gt;
          &lt;tr&gt;
              &lt;td&gt; &lt;/td&gt;
              &lt;td&gt; &lt;/td&gt;
              &lt;td&gt; &lt;/td&gt;
              &lt;td&gt; &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tfoot&gt;
  
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;John Smith&lt;/td&gt;
              &lt;td&gt;Male&lt;/td&gt;
              &lt;td&gt;1967&lt;/td&gt;
              &lt;td&gt;17-6-2007&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class="AspNet-GridView-Alternate altrow_style"&gt;
              &lt;td&gt;Mary Kay&lt;/td&gt;
              &lt;td&gt;Female&lt;/td&gt;
              &lt;td&gt;1972&lt;/td&gt;
              &lt;td&gt;15-11-2007&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Bill Jones&lt;/td&gt;
              &lt;td&gt;Male&lt;/td&gt;
              &lt;td&gt;1970&lt;/td&gt;
              &lt;td&gt;23-2-2007&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>There are a few more HTML elements that I'd like to add to the table markup that this GridView control will generate. For starters, I need the TFOOT to look like this:</p>
  
  <pre><code>&lt;tfoot&gt;
      &lt;tr&gt;
          &lt;td colspan="4"&gt;
              &lt;div&gt;
                  &lt;a class="footerlink_style" title="Newest Members" href="#"&gt;Newest Members&lt;/a&gt;
                  &lt;a class="footerlink_style" title="Top Posters" href="#"&gt;Top Posters&lt;/a&gt;
              &lt;/div&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tfoot&gt;
  </code></pre>
  
  <p>The links will not contain databound information, but will likely be Hyperlink controls.  Is there a way I can specify this at design-time?</p>
  
  <p>Also, for the THEAD, is it possible to specify separate styles for each column header like this in the GridView?</p>
  
  <pre><code>&lt;thead&gt;
      &lt;tr style="header_style"&gt;
          &lt;th scope="col" style="col1_style"&gt;Full Name&lt;/th&gt;
          &lt;th scope="col" style="col2_style"&gt;Gender&lt;/th&gt;
          &lt;th scope="col" style="col3_style"&gt;Year of Birth&lt;/th&gt;
          &lt;th scope="col" style="col4_style"&gt;Date Joined&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  </code></pre>
  
  <p>Finally, is it possible to specifiy the summary attribute of the table like this?</p>
  
  <pre><code>&lt;table cellpadding="0" cellspacing="0" summary="Here is a list of users"&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>