I want to βgroupβ some columns in a WPF GridView, having an extra header row that spans a couple of columns in a GridView.
In ASP.Net with a repeater, this would look like this:
<asp:Repeater ID="myRepeater">
<HeaderTemplate>
<table>
<tr>
<td></td>
<td colspan="2">Group 1</td>
<td colspan="2">Group 2</td>
<td></td>
</tr>
<tr>
<td>Value 1 Header</td>
<td>Value 2 Header</td>
<td>Value 3 Header</td>
<td>Value 4 Header</td>
<td>Value 5 Header</td>
<td>Value 6 Header</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>Value 1</td>
<td>Value 2</td>
<td>Value 3</td>
<td>Value 4</td>
<td>Value 5</td>
<td>Value 6</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Thus, the value β1β will have only one heading, while the βValue 2β and βValue 3β will have the heading and the heading of the group above.
Any thoughts on how to do this in WPF? Thank.
source
share