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

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

Hello everyone,

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




Thanks,

3 Replies

SS Sivaraman Sivagurunathan Syncfusion Team 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 
 



GC Giovanni Cuadra June 7, 2017 03:57 PM UTC

Thanks,


SS Sivaraman Sivagurunathan Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon