Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
635
Using Conditional Format Rule to change cell background
posted

I am trying to use the conditionalformatcollection to format cells equal to 0 to be red.  I used the following code:

<igGrid:TextColumn HeaderText="Weight" Key="Weight">
<igGrid:TextColumn.ConditionalFormatCollection>
  <igGrid:EqualToConditionalFormatRule>
    <igGrid:EqualToConditionalFormatRule.Value>
      0
    </igGrid:EqualToConditionalFormatRule.Value>
    <igGrid:EqualToConditionalFormatRule.StyleToApply>
      <Style TargetType="igGrid:CellControl">
 <Setter Property="Background" Value="Red" />
      </Style>
    </igGrid:EqualToConditionalFormatRule.StyleToApply>
  </igGrid:EqualToConditionalFormatRule>
</igGrid:TextColumn.ConditionalFormatCollection>
</igGrid:TextColumn>

 It works, but not for rows that are hovered, or that have the default alternate color. What do I need to do to fix this?