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

live GroupHeaderRow Background color

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Yu
Top achievements
Rank 1
Yu asked on 26 Feb 2013, 10:37 PM
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

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 01 Mar 2013, 12:42 PM
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.

Tags
GridView
Asked by
Yu
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or