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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Foreground (text) color using styling

Thread ID:

Created:

Updated:

Platform:

Replies:

120036 Aug 25,2015 06:55 PM UTC Aug 26,2015 02:17 PM UTC WPF 1
loading
Tags: SfDataGrid
Ralph
Asked On August 25, 2015 06:55 PM UTC

I am trying to change the color of the text in the SfDataGrid.
I have tried setting the Foreground color for the entire grid using Visual Studio's Properties panel as well as using a RowStyle and CellStyle however the font refuses to change color and always remains black.
I have managed to change the border and background colors as well as the font type and size but the color refuses to change.

Any ideas?

Jai Ganesh S [Syncfusion]
Replied On August 26, 2015 02:17 PM UTC

Hi Ralph,


Thank you for contacting Syncfusion Support.


We have analyzed your query. You can achieve your requirement for changing the text color of SfDataGrid by writing the style for SfDataGrid and set the ForeGround color.


Code Snippet [XAML]:

<Window.Resources>

       

        <Style TargetType="syncfusion:SfDataGrid">

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

        </Style>

    </Window.Resources>


We have also prepared the sample based on this and please find the sample from the below location,


Sample: http://www.syncfusion.com/downloads/support/directtrac/143174/ze/WpfTestingSample-173558743


UG Link: http://help.syncfusion.com/ug/wpf/index.html#!Documents/createasimpleapplicationwithdatagrid.htm


Please let us know if you need further assistance.


Thank you,

Jai Ganesh S


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

;