This question is locked. New answers and comments are not allowed.
Hello,
I'm using a footer on some columns on my radgrid to display some informations about accounting.
The first column displays a stackpanel with two static textblocks (works fine)
But I'd like the other ones to display an aggregate function and a textblock , one above the other.
If the aggregate function works fine, I can't get the textblock to work properly.
it either displays right in front on the aggregate function, or doesn't diplay at all. I even had the case where the textblock removed the aggregate function.
Here's the code snippet for the xaml of the grid :
<grid:GridViewDataColumn HeaderText="Date échéance"
DataFormatString="{}{0:d}"
TextAlignment="Center"
Width="Auto"
DataMemberPath="dt_echeance" >
<grid:GridViewDataColumn.Footer>
<StackPanel Orientation="Vertical">
<TextBlock Text="Solde : "
VerticalAlignment="Top"/>
<TextBlock Text="Solde pointage : "
VerticalAlignment="bottom"/>
</StackPanel>
</grid:GridViewDataColumn.Footer>
</grid:GridViewDataColumn>
<grid:GridViewDataColumn HeaderText="Débit"
TextAlignment="Right"
DataMemberPath="debit"
Width="Auto" >
<grid:GridViewDataColumn.AggregateFunctions >
<data:SumFunction ResultFormatString="{}{0:c}"
SourceField="debit" />
</grid:GridViewDataColumn.AggregateFunctions>
<grid:GridViewDataColumn.Footer>
<StackPanel Orientation="Vertical">
<gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Top" Text="{Binding FormattedValue}"
HorizontalAlignment="Right"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</gridView:AggregateResultsList>
<TextBlock Text=" "
VerticalAlignment="Bottom"/>
</StackPanel>
</grid:GridViewDataColumn.Footer>
</grid:GridViewDataColumn>
The textblock must either be bind to a value, or initialized in code behind.
Thanks for your help
Ludovic
I'm using a footer on some columns on my radgrid to display some informations about accounting.
The first column displays a stackpanel with two static textblocks (works fine)
But I'd like the other ones to display an aggregate function and a textblock , one above the other.
If the aggregate function works fine, I can't get the textblock to work properly.
it either displays right in front on the aggregate function, or doesn't diplay at all. I even had the case where the textblock removed the aggregate function.
Here's the code snippet for the xaml of the grid :
<grid:GridViewDataColumn HeaderText="Date échéance"
DataFormatString="{}{0:d}"
TextAlignment="Center"
Width="Auto"
DataMemberPath="dt_echeance" >
<grid:GridViewDataColumn.Footer>
<StackPanel Orientation="Vertical">
<TextBlock Text="Solde : "
VerticalAlignment="Top"/>
<TextBlock Text="Solde pointage : "
VerticalAlignment="bottom"/>
</StackPanel>
</grid:GridViewDataColumn.Footer>
</grid:GridViewDataColumn>
<grid:GridViewDataColumn HeaderText="Débit"
TextAlignment="Right"
DataMemberPath="debit"
Width="Auto" >
<grid:GridViewDataColumn.AggregateFunctions >
<data:SumFunction ResultFormatString="{}{0:c}"
SourceField="debit" />
</grid:GridViewDataColumn.AggregateFunctions>
<grid:GridViewDataColumn.Footer>
<StackPanel Orientation="Vertical">
<gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Top" Text="{Binding FormattedValue}"
HorizontalAlignment="Right"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</gridView:AggregateResultsList>
<TextBlock Text=" "
VerticalAlignment="Bottom"/>
</StackPanel>
</grid:GridViewDataColumn.Footer>
</grid:GridViewDataColumn>
The textblock must either be bind to a value, or initialized in code behind.
Thanks for your help
Ludovic