please refer to this stackoverflow question:
Change DataGrid cell colour based on values
The provided answer involves checking against a property on a cell, to modify its colour.
With GridView (in my case RadGridView) each cell's DataContext is bound to its whole row. Now, I have a situation where I would like to set my cell to "bold" if its modified.
To determine if a cell is modified, it checks against an "IsDirty" property, this property exists on the Cell level in my DataContext, it does not exist on the Row level.
As an example of my code:
<Style TargetType="{x:Type telerik:GridViewCell}" BasedOn="{StaticResource GridViewCellStyle}">
<Setter Property="FontWeight" Value="Normal"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsDirty}" Value="False">
<Setter Property="FontWeight" Value="Bold"/>
</DataTrigger>
</Style.Triggers>
</Style>
This style does not work because the datacontext is the whole row. However the IsDirty flag applies to the individual cell.
Does anybody know a work around?