This is a migrated thread and some comments may be shown as answers.

RadGridview Cell font color not changing

3 Answers 714 Views
GridView
This is a migrated thread and some comments may be shown as answers.
cha
Top achievements
Rank 1
cha asked on 29 Dec 2016, 01:34 PM

I have this style defined in the page resource

                <Style x:Key="MsgStatusStyle" TargetType="telerik:GridViewCell">
                    <Setter Property="Foreground" Value="Red" />
                    <Setter Property="HorizontalContentAlignment" Value="Left" />
                </Style>

I assign the style for a GridViewDataColumn as follows

                    <telerik:GridViewDataColumn DataMemberBinding="{Binding MsgStatus}" Header="Msg Status" UniqueName="MsgStatus" 
                                                IsReadOnly="True" IsVisible="{Binding  Data.GridColumns.MsgStatusIsVisible, Source={StaticResource proxy} , Mode=TwoWay}"
                                                DisplayIndex="{Binding  Data.GridColumns.MsgStatusOrder, Source={StaticResource proxy} , Mode=TwoWay}"
                                                SortMemberPath="MsgStatus" CellStyle="{StaticResource MsgStatusStyle}" >
                    </telerik:GridViewDataColumn>

But the foreground doesnt change to Red. If I change the property in the style definition to background that changes to red upon rendering.

Any idea why froeground color doesnt change ?

 

3 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 29 Dec 2016, 04:36 PM
Hello,

I've tried to reproduce the problem you report, but to no avail. Please check the attached sample project for a reference and let me know how it differs from your setup.

Regards,
Yoan
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
cha
Top achievements
Rank 1
answered on 29 Dec 2016, 05:23 PM

My code is identical to yours.

We are using Telerik 2014 version. Attached is the version of the GridControl.dll and also my project is in .Net 4.0.

My Grid has lot more columns. Each have its own styles / conditional styler assigned. I also have a row level styler but that only sets the background of the row based on some conditions. I don't have Foreground set in any of the other styles. MsgStatus field(from my example) is the only column where Foreground was set. Its weird the background color changes works fine but not the foreground.

0
Ivan Ivanov
Telerik team
answered on 30 Dec 2016, 10:25 AM
Hello,

Thank you for checking the specific version for us. I updated the project that my colleague Yoan prepared by using these assemblies, but we still cannot reproduce the issue on our side. Can you please refer to the updated project and try to reproduce the issue by modifying it? If you manage to to do it, please list the needed steps, so that I can debug it on our side.

Regards,
Ivan Ivanov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
cha
Top achievements
Rank 1
Answers by
Yoan
Telerik team
cha
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Share this question
or