We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change grouping icon in sfDataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

131091 Jun 20,2017 07:30 AM UTC Jun 22,2017 04:42 AM UTC WPF 3
loading
Tags: SfDataGrid
Miroslav Hadzic
Asked On June 20, 2017 07:30 AM UTC

Is it possible to change icon in the grouping feature of sfDataGrid? Or at least icon color.
Thanks

Muthukumar Kalyanasundaram [Syncfusion]
Replied On June 21, 2017 07:00 AM UTC

Hi Miroslav, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your query. Please find the response from below table. 
 
 
Query 1: 
Is it possible to change icon in the grouping feature of sfDataGrid? Or at least icon color? 
 
 
If you want to change the icon of expander cell then you can customize the style of “GridExpanderCellControl” as shown like below code,  
 
<Style TargetType="syncfusion:GridExpanderCellControl"> 
    <Setter Property="IsTabStop" Value="False" />  
    <Setter Property="Template"> 
        <Setter.Value> 
            <ControlTemplate TargetType="syncfusion:GridExpanderCellControl"> 
                <Border Background="{TemplateBinding Background}" 
                    BorderBrush="{TemplateBinding BorderBrush}" 
                    BorderThickness="{TemplateBinding BorderThickness}" 
                    SnapsToDevicePixels="True"> 
                    . . . . .  
                    . . . . . 
                    <Path x:Name="PART_GridExpanderCellPath" 
                        Width="{TemplateBinding Width}" 
                        Height="{TemplateBinding Height}" 
                        HorizontalAlignment="Center" 
                        VerticalAlignment="Center" 
                        Data="F1M0.697,8.01L0,7.293 3.373,4.005 0,0.717 0.697,0 4.804,4.005z" 
                        Fill="{TemplateBinding Foreground}" 
                        SnapsToDevicePixels="True" 
                        Stretch="Fill" 
                        Stroke="{TemplateBinding Foreground}" 
                        UseLayoutRounding="False"> 
                        <Path.RenderTransform> 
                            <TransformGroup> 
                                <TransformGroup.Children> 
                                    <RotateTransform Angle="180" CenterX="4" CenterY="4" /> 
                                </TransformGroup.Children> 
                            </TransformGroup> 
                        </Path.RenderTransform> 
                    </Path> 
                </Border> 
            </ControlTemplate> 
        </Setter.Value> 
    </Setter> 
</Style> 
 
 
Query 2: 
Is it possible to change icon color in grouping? 
 
 
If you want to change the icon color of expander cell, then you can customize the style of GridExpanderCellControl” as shown like below code,  
 
<Style TargetType="syncfusion:GridExpanderCellControl"> 
    <Setter Property="IsTabStop" Value="False" /> 
    <Setter Property="Foreground" Value=" Red " />            
</Style> 
 
 
 
Please let us know if you have any query. 
 
Regards, 
Muthukumar K 


Miroslav Hadzic
Replied On June 21, 2017 09:17 AM UTC

Thaks.

Works like expected.


Muthukumar Kalyanasundaram [Syncfusion]
Replied On June 22, 2017 04:42 AM UTC

Hi Miroslav, 
 
Thanks for the update. Please let us know if you need any other assistance. 
 
Regards, 
Muthukumar K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;