Cell Style template not applying for the GridViewDataColumn

3 posts, 1 answers
  1. Dharmavaram
    Dharmavaram avatar
    98 posts
    Member since:
    Jun 2013

    Posted 27 Jul Link to this post

    Hi,

    I am trying to apply background color to particular GridViewDataColumn in RadTreeListView.If I directly set the background color it is working fine, but when I use CellStyle Parameter and set the style it is not working and data also not populating once CellStyle Parameter is given.

     

     Xaml Code realted  to GridViewDatacolumn as below

       <telerik:RadTreeListView.Columns>

    <telerik:GridViewDataColumn Width="*" ShowFilterButton="False" Header="Action Descriptor"
                                                        IsReadOnly="True"  CellStyle="{StaticResource cellStyleTemplate}"
                                                        DataMemberBinding="{Binding DataContext,RelativeSource={RelativeSource Self}  ,Converter={StaticResource NodeToDisplayNameConverter}}"  >

       </telerik:RadTreeListView.Columns>

     

    Template used 

       <Style x:Key="cellStyleTemplate" TargetType="telerik:GridViewCell">
                <Setter Property="Background" Value="Red"/>
            </Style>

     

    Regards,

    Nagasree

     

  2. Answer
    Martin Ivanov
    Admin
    Martin Ivanov avatar
    1402 posts

    Posted 28 Jul Link to this post

    Hello Nagasree,

    Without your implementation I cannot be sure but my guess is that you are using NoXaml dlls. If so, you will need base the GridViewCell Style to the default style of the control.
    <Style x:Key="cellStyleTemplate" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
        <Setter Property="Background" Value="Red"/>
    </Style>

    I hope this helps.

    Regards,
    Martin Ivanov
    Progress Telerik
    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. Dharmavaram
    Dharmavaram avatar
    98 posts
    Member since:
    Jun 2013

    Posted 01 Aug in reply to Martin Ivanov Link to this post

    Hi,

     

    Thanks it is working fine.

Back to Top