RadGridview Cell font color not changing

4 posts, 0 answers
  1. cha
    cha avatar
    23 posts
    Member since:
    Mar 2011

    Posted 29 Dec 2016 Link to this post

    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 ?

     

  2. Yoan
    Admin
    Yoan avatar
    1112 posts

    Posted 29 Dec 2016 Link to this post

    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.
  3. cha
    cha avatar
    23 posts
    Member since:
    Mar 2011

    Posted 29 Dec 2016 in reply to Yoan Link to this post

    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.

  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1185 posts

    Posted 30 Dec 2016 Link to this post

    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.
Back to Top