In the RadGridView, when the grid is grouped by a column, each group header row has an arrow icon on the left hand side pointing up or down to indicate whether the group is expanded or not. Is it possible to change that icon to a custom icon?
I am using Telerik for Silverlight project. I have parent child relationship in tables. I am able to display data from both tables. Parent table expand/collapse with arrow icon but child table's data expand/collapse with +/- icon.
I want both table's data should expand/collapse with arrow icon.
Can you please help me.
Thanks.
Stenly
Telerik team
commented on 12 Jan 2023, 04:07 PM
To achieve this requirement, you could create a new DataTemplate for the PlusMinusTemplate property of the GridViewToggleButton element.
Alternatively, the default control template for the PlusMinusTemplate could be extracted and modified to suit the needs of the application that you are currently working on. The Editing Control Templates article from our documentation shows a step-by-step guide on how to extract our templates.
Finally, after creating a custom one, or modifying the default one, create a new Style with TargetType="GridViewToggleButton" and set the custom template to the PlusMinusTemplate property.
<!--If NoXaml is used add the BasedOn property: BasedOn="{StaticResource GridViewToggleButtonStyle}"--><StyleTargetType="telerik:GridViewToggleButton"><SetterProperty="PlusMinusTemplate"Value="{StaticResource MyGridViewToggleButtonTemplate}"/></Style>
2 Answers, 1 is accepted
0
Accepted
Yoan
Telerik team
answered on 07 Sep 2015, 07:29 AM
Hi Russell,
You can achieve this by modifying the default style of the GridViewGroupRow. Please check this help article for a reference.
Regards,
Yoan
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
Hello,
I am using Telerik for Silverlight project. I have parent child relationship in tables. I am able to display data from both tables. Parent table expand/collapse with arrow icon but child table's data expand/collapse with +/- icon.
I want both table's data should expand/collapse with arrow icon.
Can you please help me.
Thanks.
To achieve this requirement, you could create a new DataTemplate for the PlusMinusTemplate property of the GridViewToggleButton element.
Alternatively, the default control template for the PlusMinusTemplate could be extracted and modified to suit the needs of the application that you are currently working on. The Editing Control Templates article from our documentation shows a step-by-step guide on how to extract our templates.
Finally, after creating a custom one, or modifying the default one, create a new Style with TargetType="GridViewToggleButton" and set the custom template to the PlusMinusTemplate property.
<!--If NoXaml is used add the BasedOn property: BasedOn="{StaticResource GridViewToggleButtonStyle}"--> <Style TargetType="telerik:GridViewToggleButton"> <Setter Property="PlusMinusTemplate" Value="{StaticResource MyGridViewToggleButtonTemplate}"/> </Style>