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

change color for GroupColumnDescriptions

I wish to change color for    GroupColumnDescriptions base on the status, such as break down the group column description header show red color

2 Replies

AD asolute dev December 19, 2018 08:43 AM UTC

I try to find the change color in GroupColumnDescriptions however there is no such property , can you share some snippet code ?

VR Vigneshkumar Ramasamy Syncfusion Team December 19, 2018 11:58 AM UTC

Hi Asolute,  
Your requirement to set the background color for the GroupColumnDescription can be achived by using SfDataGrid.GridStyle.  
Please refer the below UG for more details:  
Please find the below code snippet to achieve your requirement.  
public class CustomStyle : DataGridStyle  
        public override Color GetCaptionSummaryRowBackgroundColor()  
            return Color.Yellow;  
        public override Color GetCaptionSummaryRowForegroundColor()  
            return Color.Red;  
            <local:CustomStyle x:Key="customStyle" />  
        <sfgrid:SfDataGrid x:Name="sfGrid"  
             ItemsSource="{Binding OrdersInfo}"  
             GridStyle="{StaticResource customStyle}"  
                <sfgrid:GridTextColumn MappingName="OrderID" />  
                <sfgrid:GridTextColumn MappingName="EmployeeID" />  
                <sfgrid:GridTextColumn MappingName="CustomerID" />  
                <sfgrid:GridTextColumn MappingName="ShipCountry" HeaderText="Country"/>  
                <sfgrid:GroupColumnDescription ColumnName="CustomerID" />  
We have prepared the sample as per your requirement, you can download the same from the below link.  
Vigneshkumar R 

Live Chat Icon For mobile
Up arrow icon