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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change background color of the very first column

Thread ID:





117593 Nov 13,2014 08:53 AM UTC Nov 13,2014 02:12 PM UTC WinRT 1
Tags: SfDataGrid
Asked On November 13, 2014 08:53 AM UTC

Hi there,

How can I change background color of the "tool" column?
I've already tried:
  <Style x:Key="headerCellStyle" TargetType="syncfusiongrid:GridHeaderCellControl">
            <Setter Property="Background" Value="DarkRed" />

all columns get filled with DarkRed color except the first one. (see attachment)

thanks in advance.

Attachment: 1_c188b289.zip

Farjana Parveen Ayubb [Syncfusion]
Replied On November 13, 2014 02:12 PM UTC

Hi Vladimir,

Thank you for contacting Syncfusion support.

We have analyzed your query. If you set the HeaderStyle property in grid, style will be applied for all the column headers in the grid. So if you want to set the style for particular column only, you can use the HeaderStyle property in the GridColumn. And if you need to set the style for particular column, you can use the CellStyle property in grid column.

Please refer the below code snippet and sample in the following location:

Code Snippet:

Please refer the below code snippet for styling the HeaderCell and GridCell


        <Style x:Key="headerstyle" TargetType="syncfusion:GridHeaderCellControl">

            <Setter Property="Background" Value="Red" />


        <Style x:Key="cellstyle" TargetType="syncfusion:GridCell">

            <Setter Property="Background" Value="Red" />




Please refer the below code snippet for setting the style to the particular column.


                    <syncfusion:GridTextColumn MappingName="ProductId" CellStyle="{StaticResource cellstyle}" HeaderStyle="{StaticResource headerstyle}"/>

                    <syncfusion:GridTextColumn MappingName="ProductName"/>



UG Link: http://help.syncfusion.com/UG/winrt/default.htm#!Documents/stylingcells.htm


Farjana Parveen A

Attachment: SfDataGrid_Changing_Background_color_fa25e1c7.zip


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