This question is locked. New answers and comments are not allowed.
I have a gridview containing 2 header-rows. The first row (CommonHeader) displays years, the second row (GridViewDataColumn) displays quarters 1 to 4.
Each column in first row is set up with a columnspan of 4 in the xaml, and the appropriate startcolumnindex.
xaml looks something like this:
...
In addition I have attached a contextmenu on rightclick on the columns, giving the option to show/hide columns.
The problem with this is the columnspan of the "CommonHeader"-row. Do I have to write code for updating the columnspan when I show/hide columns, or is there a property I can set that fixes this for me.
Each column in first row is set up with a columnspan of 4 in the xaml, and the appropriate startcolumnindex.
xaml looks something like this:
...
<local:CommonHeader StartColumnIndex="1" ColumnSpan="4" ><TextBlock Text="2008" />
</local:CommonHeader>
<local:CommonHeader StartColumnIndex="5" ColumnSpan="4" ><TextBlock Text="2009" />
</local:CommonHeader>
...<telerik:GridViewDataColumn Header="Q1" /><telerik:GridViewDataColumn Header="Q2" /><telerik:GridViewDataColumn Header="Q3" /><telerik:GridViewDataColumn Header="Q4" /><telerik:GridViewDataColumn Header="Q1" /><telerik:GridViewDataColumn Header="Q2" /><telerik:GridViewDataColumn Header="Q3" /><telerik:GridViewDataColumn Header="Q4" />
...
In addition I have attached a contextmenu on rightclick on the columns, giving the option to show/hide columns.
The problem with this is the columnspan of the "CommonHeader"-row. Do I have to write code for updating the columnspan when I show/hide columns, or is there a property I can set that fixes this for me.