title: Programatically generate gridview with specific template
body: <p>I am currently trying to generate a <code>Gridview</code> that will look something like this.</p>
  
  <p><a href="https://i.stack.imgur.com/2Ep5a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Ep5a.png" alt="Example"></a> </p>
  
  <p>The first two columns are done with <code>Boundfield</code>, where I will grab based on the data given in database. </p>
  
  <p>However, the problem comes in when I've to have the row of <code>AM</code> &amp; <code>PM</code>. </p>
  
  <p>Is there a way to do a <code>colspan</code> for the header of the date and create a row just for the <code>AM</code> &amp; <code>PM</code>? Because <code>AM</code> &amp; <code>PM</code> is not counted as columns, instead the <code>10/11/2016</code> is a column.</p>
  
  <p>ASPX</p>
  
  <pre><code>&lt;asp:GridView ID="gvAttendance" runat="server"&gt;
                      &lt;Columns&gt;
                          &lt;asp:BoundField DataField="traineeID" HeaderText="Trainee ID" /&gt;
                          &lt;asp:BoundField DataField="idNum" HeaderText="ID" /&gt;
                      &lt;/Columns&gt;
                  &lt;/asp:GridView&gt;
  </code></pre>