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
    <telerik:RadGridView.GroupHeaderTemplate>
                   <DataTemplate>
                       <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}}"/>
                       </StackPanel>
                   </DataTemplate>
               </telerik:RadGridView.GroupHeaderTemplate>

    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.
    http://blogs.telerik.com/vladimirenchev/posts/10-10-04/fast-real-time-data-update-for-your-silverlight-and-wpf-applications.aspx

    Thanks
  2. Yoan
    Admin
    Yoan avatar
    1182 posts

    Posted 01 Mar 2013 Link to this post

    Hello,

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

    Kind regards,
    Yoan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top