Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top