I have a data entry grid that I am grouping by a code in each detail record (by default - the user does not see the grouping panel). I would like to be able to show some additional data from the group on the header. To do this I am using Aggregate functions which does display the correct data. However, I really want to be able to format these results to save some space and make the display more readable. For example:
00000 Description Cash Inv
1.00 5.00
What shows is:
00000 Description Cash 1.00 Inv 5.00
If I leave the aggregate functions showing, I can't seem to format them. Here is the group descriptor and template that I am trying to use. What am I missing? Is there another way to do this? The data is really parent/child related but the data entry is better for our users if they can go from one "parent' to another so flattened the heirarchy. This is working fine except the display of the group header.
thanks, Koren
P.S. I realize that the template display may not be exactly right but I can't tweak it until it actually displays something.
00000 Description Cash Inv
1.00 5.00
What shows is:
00000 Description Cash 1.00 Inv 5.00
If I leave the aggregate functions showing, I can't seem to format them. Here is the group descriptor and template that I am trying to use. What am I missing? Is there another way to do this? The data is really parent/child related but the data entry is better for our users if they can go from one "parent' to another so flattened the heirarchy. This is working fine except the display of the group header.
thanks, Koren
P.S. I realize that the template display may not be exactly right but I can't tweak it until it actually displays something.
<
telerik:RadGridView.GroupHeaderTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
Margin
=
"0,0"
>
<
TextBlock
Text
=
"{Binding Group.Key}"
Margin
=
"0,0,0,2"
Width
=
"200"
/>
<
telerik:AggregateResultsList
ItemsSource
=
"{Binding}"
VerticalAlignment
=
"Center"
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
VerticalAlignment
=
"Center"
>
<
TextBlock
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Text
=
"{Binding Caption}"
Width
=
"80"
/>
<
TextBlock
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Text
=
"{Binding FormattedValue}"
Width
=
"80"
/>
</
StackPanel
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
<
ItemsControl.ItemsPanel
>
<
ItemsPanelTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
/>
</
ItemsPanelTemplate
>
</
ItemsControl.ItemsPanel
>
</
telerik:AggregateResultsList
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadGridView.GroupHeaderTemplate
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
x:Name
=
"TransactionGroup"
Member
=
"TransactionGroup"
SortDirection
=
"Ascending"
>
<
telerik:GroupDescriptor.AggregateFunctions
>
<
telerik:MinFunction
Caption
=
"Cash: "
SourceField
=
"CashTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Inv Beg: "
SourceField
=
"BegInvTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"End: "
SourceField
=
"EndInvTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Acc Beg: "
SourceField
=
"BegAccruedTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"End: "
SourceField
=
"EndAccruedTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Accrual: "
SourceField
=
"AccrualAmount"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:SumFunction
Caption
=
"Ent Amt: "
SourceField
=
"Amount"
ResultFormatString
=
"{}{0:c2}"
/>
<
local:EnterpriseDifferenceFunction
Caption
=
"Diff: "
ResultFormatString
=
"{}{0:0.00}"
/>
</
telerik:GroupDescriptor.AggregateFunctions
>
</
telerik:GroupDescriptor
>
</
telerik:RadGridView.GroupDescriptors
>