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

It is possible to change the background color of the grid header and text?

Thread ID:

Created:

Updated:

Platform:

Replies:

130824 Jun 5,2017 05:39 PM UTC Jun 8,2017 12:48 PM UTC Xamarin.Forms 3
loading
Tags: SfDataGrid
Giovanni Cuadra
Asked On June 5, 2017 05:39 PM UTC

Hello everyone,

Is it possible to change the background color of the grid headers as well as the text color?




Thanks,

Sivaraman Sivagurunathan [Syncfusion]
Replied On June 6, 2017 01:43 PM UTC

Hi Giovanni Cuadra, 
 
Thanks for contacting Syncfusion Support. 
 
We have checked your query. You can set the background and Text color for the header using GridColumn.HeaderTemplate property. 
 
The below code example illustrates how to set the Header Template. 
 
 
<syncfusion:GridTextColumn  MappingName="OrderID"> 
    <syncfusion:GridTextColumn.HeaderTemplate> 
      <DataTemplate> 
          <Label Text="Order ID" FontAttributes="Bold" TextColor="Blue" BackgroundColor="Gray" YAlign="Center" XAlign="Center"  /> 
      </DataTemplate> 
  </syncfusion:GridTextColumn.HeaderTemplate> 
</syncfusion:GridTextColumn> 
 
                                 
We have prepared sample based on your requirement and attached the sample for your reference.you can download the same from the below link. 
 
 
And we have published KB for this. Please refer the KB also. 
 
 
Regards, 
Sivaraman 
 


Giovanni Cuadra
Replied On June 7, 2017 03:57 PM UTC

Thanks,

Sivaraman Sivagurunathan [Syncfusion]
Replied On June 8, 2017 12:48 PM UTC

Hi Giovanni Cuadra, 
 
Thanks for the update.

Please let us know if you require further assistance on this.
 
 
Regards, 
Sivaraman 


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

;