This is a migrated thread and some comments may be shown as answers.

How to change the fore colour of an AggregateFunctions

0 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew
Top achievements
Rank 1
Andrew asked on 11 Jun 2012, 11:02 AM
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 &lt; 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>
Tags
GridView
Asked by
Andrew
Top achievements
Rank 1
Share this question
or