This is a migrated thread and some comments may be shown as answers.

PivotGrid Way to disable collapsing on a ColumnGroupDescription

6 Answers 183 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Fitz
Top achievements
Rank 1
Fitz asked on 23 Jan 2015, 05:28 PM
Is there a way within Wpf to disable collapsing of a Column Group Description?
I have a Type, SubType and then Aggregations. 
Currently the user can collapse the Type on the Column Group.
I want to prevent them from collapsing all the types and leave the last one open.

6 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 28 Jan 2015, 11:10 AM
Hi David,

You should be able to hide the expand/collapse button by modifying the ControlTemplate of PivotGroupHeader, for example you can set the Visibility of the Grid named PART_ExpandIcon to Collapsed. However note that this will affect all the GroupHeader levels, so you might also need to use a ValueConverter in order to hide/show only the needed GroupHeaders.

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Fitz
Top achievements
Rank 1
answered on 29 Jan 2015, 10:51 PM
Don't I need the full ControlTemplate of the radpivotgrid if I want to Change the PivotGroupHeader part of it to set the visiblity to Collapsed?

[quote]Kalin said:Hi David,

You should be able to hide the expand/collapse button by modifying the ControlTemplate of PivotGroupHeader, for example you can set the Visibility of the Grid named PART_ExpandIcon to Collapsed. However note that this will affect all the GroupHeader levels, so you might also need to use a ValueConverter in order to hide/show only the needed GroupHeaders.

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
[/quote]
0
Fitz
Top achievements
Rank 1
answered on 29 Jan 2015, 11:11 PM
Never mind I used a style and set the control template on the PivotGroupHeaders.
0
Kalin
Telerik team
answered on 30 Jan 2015, 11:30 AM
Hello,

I'm glad you have managed to achieve the desired scenario. If you have any other questions, let us know.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Fitz
Top achievements
Rank 1
answered on 30 Jan 2015, 04:31 PM
This is what I used to do this, but it isn't quite right.  How do I get to the named Grid to set the Visiblity?  Or do I have to use Blend?
This actually removed the PivotGroupHeader and replaced it with a Gird that was hidden.  I want to set the Visiblity on the Grid named PART_ExpandIcon.  Any help with it you can lend will be appreciated?

<Style TargetType="pivot:PivotGroupHeader">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type Grid}">
              <Grid Name="PART_ExpandIcon" Visibility="Hidden">
              </Grid>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
0
Fitz
Top achievements
Rank 1
answered on 30 Jan 2015, 04:33 PM
Here is the correct xaml:
 <Style TargetType="pivot:PivotGroupHeader">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="pivot:PivotGroupHeader">
              <Grid Name="PART_ExpandIcon" Visibility="Hidden">
              </Grid>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
Tags
PivotGrid
Asked by
Fitz
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Fitz
Top achievements
Rank 1
Share this question
or