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.
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
0
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
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
[/quote]
[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.
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
Hello,
I'm glad you have managed to achieve the desired scenario. If you have any other questions, let us know.
Regards,
Kalin
Telerik
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>
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>
<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>