live GroupHeaderRow Background color

2 posts, 0 answers
  1. Yu
    Yu avatar
    17 posts
    Member since:
    Jul 2012

    Posted 26 Feb 2013 Link to this post

    Hi, I am using the following datatemplate to give different background color to the GroupHeaderRow
                       <StackPanel Orientation="Horizontal">
                           <CheckBox localBehavior:CheckBoxBehavior.IsEnabled="True" IsThreeState="True" Margin="0 0 3 0"/>
                           <TextBlock Text="{Binding Group.Key}" Background="{Binding Path=Group.Items, Converter={StaticResource GroupHeaderColorResourceValueConverter}}"/>

    The .GroupHeaderColorResourceValueConverter will take the Group.Items as the input parameter and use certain property of the items to return different background color.

    However, when the property of the item changes, the GroupRowBackground color is not changed. Is there a way to make the GroupViewModel to fire an event so the GroupHeaderRow can get the noticiation from it's ViewModel to refelect the changes?

    I tried the approach in the following link but it does not seem to work for the background color.

  2. Yoan
    Yoan avatar
    1182 posts

    Posted 01 Mar 2013 Link to this post


    In order to achieve your goal, I can suggest you to try GroupRowStyleSelector. Please check this online demo for a reference.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top