1

I have a TextColumn in xamGrid which has summary enabled. What i want to do is display the sum in red if it is negative. This is how the column is defined:

<igGrid:TextColumn Key="Col1" HeaderText="Col1" 
 ValueConverter="{StaticResource NumberFormatter}"  ValueConverterParameter="#,##0" >
     <igGrid:TextColumn.ConditionalFormatCollection>
       <igGrid:LessThanConditionalFormatRule Value="0.00" StyleToApply="{StaticResource RedBrush}"/>
     </igGrid:TextColumn.ConditionalFormatCollection>
     <igGrid:TextColumn.SummaryColumnSettings>
       <igGrid:SummaryColumnSettings>
         <igGrid:SummaryColumnSettings.SummaryOperands>
           <igGrid:SumSummaryOperand IsApplied="True" FormatString="{}{0:N}"/>
           <igGrid:MaximumSummaryOperand FormatString="{}{0:N}"/>
           <igGrid:MinimumSummaryOperand FormatString="{}{0:N}"/>
         </igGrid:SummaryColumnSettings.SummaryOperands>
       </igGrid:SummaryColumnSettings>
     </igGrid:TextColumn.SummaryColumnSettings>
</igGrid:TextColumn>

How do i specify that the conditional formatting should be used not only for the column cells but also the summary cell?

badmaash
  • 4,775
  • 7
  • 46
  • 61

1 Answers1

2

You can copy the default Style for the SummaryRowCellControl and use a Converter to change the foreground based on the value of the summary.

In the Infragsaitics forums a similar question is discussed. You can see the sample attached there

Stefan
  • 241
  • 1
  • 3