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. Image for the cookie policy date
close icon

Change grouping icon in sfDataGrid

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

3 Replies

MK Muthukumar Kalyanasundaram Syncfusion Team 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 



MH Miroslav Hadzic June 21, 2017 09:17 AM UTC

Thaks.

Works like expected.



MK Muthukumar Kalyanasundaram Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon