User-271186128 posted
Hi quar1nteen ,
I suggest you use Repeater control. Then you could easily format the header and item as a custom table.
Please see the example below:
<div>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:TestDbConnectionString %>" SelectCommand="SELECT * FROM Info"/>
<asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource4">
<HeaderTemplate>
<table border="1">
<tr>
<th>First Name</th>
<th rowspan="2">DOB</th>
<th rowspan="2">Age</th>
<th rowspan="2">Weight</th>
<th>Address</th>
</tr>
<tr>
<th>Last Name</th>
<th>Phone Number</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# Eval("First Name") %></td>
<td rowspan="2"><%# string.Format("{0:d}", Eval("DOB"))%></td>
<td rowspan="2"><%# Eval("Age") %></td>
<td rowspan="2"><%# Eval("Weight") %></td>
<td><%# Eval("Address") %></td>
</tr>
<tr>
<td><%# Eval("Last Name") %></td>
<td><%# Eval("Phone Number") %></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</div>
The SQL table as below:

The result as below:

Best regards,
Dillion