This question is locked. New answers and comments are not allowed.
I which to change the style of the total dependant on the value of the total
I Have it working for each row but how do i make it work for the total value displayed in the footer?
<telerik:GridViewDataColumn Header="Variance" DataMemberBinding="{Binding Variance,StringFormat='{}{0:c}'}" Width="*" TextAlignment="Right" FooterTextAlignment="Right" HeaderTextAlignment="Right">
<telerik:GridViewDataColumn.CellTemplateSelector>
<telerik:ConditionalDataTemplateSelector>
<telerik:DataTemplateRule Condition="Variance < 0" >
<DataTemplate>
<Border Background="Red">
<TextBlock TextAlignment="Right" Text="{Binding Variance, StringFormat='{}{0:c}'}" />
</Border>
</DataTemplate>
</telerik:DataTemplateRule>
<telerik:DataTemplateRule Condition="Variance >= 0">
<DataTemplate>
<TextBlock TextAlignment="Right" Text="{Binding Variance, StringFormat='{}{0:c}'}"/>
</DataTemplate>
</telerik:DataTemplateRule>
</telerik:ConditionalDataTemplateSelector>
</telerik:GridViewDataColumn.CellTemplateSelector>
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction ResultFormatString="{}{0:c}" SourceField="Variance" />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
I Have it working for each row but how do i make it work for the total value displayed in the footer?
<telerik:GridViewDataColumn Header="Variance" DataMemberBinding="{Binding Variance,StringFormat='{}{0:c}'}" Width="*" TextAlignment="Right" FooterTextAlignment="Right" HeaderTextAlignment="Right">
<telerik:GridViewDataColumn.CellTemplateSelector>
<telerik:ConditionalDataTemplateSelector>
<telerik:DataTemplateRule Condition="Variance < 0" >
<DataTemplate>
<Border Background="Red">
<TextBlock TextAlignment="Right" Text="{Binding Variance, StringFormat='{}{0:c}'}" />
</Border>
</DataTemplate>
</telerik:DataTemplateRule>
<telerik:DataTemplateRule Condition="Variance >= 0">
<DataTemplate>
<TextBlock TextAlignment="Right" Text="{Binding Variance, StringFormat='{}{0:c}'}"/>
</DataTemplate>
</telerik:DataTemplateRule>
</telerik:ConditionalDataTemplateSelector>
</telerik:GridViewDataColumn.CellTemplateSelector>
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction ResultFormatString="{}{0:c}" SourceField="Variance" />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>