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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

change color for GroupColumnDescriptions

Thread ID:





141559 Dec 18,2018 07:41 AM UTC Dec 19,2018 11:58 AM UTC Xamarin.Forms 2
Tags: SfDataGrid
asolute dev
Asked On December 18, 2018 07:41 AM UTC

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

asolute dev
Replied On 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 ?

Vigneshkumar Ramasamy [Syncfusion]
Replied On 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 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon