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

GridViewDataColumn.AggregateFunctions doesn't run when component is loaded

2 Answers 112 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.
rodolpho carmo
Top achievements
Rank 1
rodolpho carmo asked on 05 Apr 2011, 08:02 PM
Hello Telerik Team!

First, thanks for the hard these controls are awesome!


My question is very simple, I guess, but I am not finding a straight answer.


I have rad grid that must be loaded already grouped by two fields.

I created it with

<

 

 

telerik:GroupDescriptor Member="OrderID" SortDirection="Ascending" DisplayContent

="Order">

 

 

and

<

 

 

telerik:GroupDescriptor Member="ProductID" SortDirection="Ascending" DisplayContent

="Order">

 

 


Everything with this part works ok, but the fact is, I need to sum some columns , count some others and show them at the group header (every group must have information of what's collapsed.

So you can imagine my grid like this

-ORDERID 1 (value : 50 quantity:12  <-- this is the aggregated info)
--PRODUCTID 678
----under order and product goes the data
----itemID 99 - value 20 quantity 8
----itemID 98 - value 30 quantity 4

-ORDERID 2 (value : 88 quantity: 4 <-- this is the aggregated info)
--PRODUCTID 677
----under order and product goes the data
----itemID 65 - value 77 quantity 3
----itemID 66 - value 11 quantity 1

 What is highlited in blod (I mean, the aggregated info) does not works when the component is first loaded. if I remove the grouping and do this manually (by going to the grid, grabbing the column and putting it into the group header) then it works. What am I missing when constructing this?

this is built using data columns aggregated functions.

 

 

 

<telerik:GridViewDataColumn.AggregateFunctions

>

 

 

 

 

 

<telerik:SumFunction Caption

="Quantity: " />

 

 

 

 

 

</telerik:GridViewDataColumn.AggregateFunctions

>

 

 


 

 

 

<telerik:GridViewDataColumn.AggregateFunctions

>

 

 

 

 

 

<telerik:SumFunction Caption

="Value: " />

 

 

 

 

 

</telerik:GridViewDataColumn.AggregateFunctions

>

 

 


Any suggestions?

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 06 Apr 2011, 06:50 AM
Hi,

 Please use ColumnGroupDescriptor instead similar to this demo. You need to define the descriptor in code. 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
rodolpho carmo
Top achievements
Rank 1
answered on 06 Apr 2011, 01:45 PM
Perfect! this works wonderfully well!

thanks for the quick answer! I am enjoying A LOT working with these controls.

Tags
GridView
Asked by
rodolpho carmo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
rodolpho carmo
Top achievements
Rank 1
Share this question
or