Dario Zanelli
Top achievements
Rank 1
Dario Zanelli
asked on 13 Jul 2010, 05:26 PM
Hi,
I am using the aggregate function of the Telerik. see code below)
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="Categoria" />
<telerik:GridGroupByField FieldName="RiskValue" Aggregate="Avg" HeaderText="Valore medio di rischio" />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="categoria" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
Is it possible to sort the columns according to the value of the aggregate function (average)?
Kind regards,
Dario Zanelli
I am using the aggregate function of the Telerik. see code below)
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="Categoria" />
<telerik:GridGroupByField FieldName="RiskValue" Aggregate="Avg" HeaderText="Valore medio di rischio" />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="categoria" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
Is it possible to sort the columns according to the value of the aggregate function (average)?
Kind regards,
Dario Zanelli
7 Answers, 1 is accepted
0
Hello Dario Zanelli,
When you set your group by field, the GridGroupByField.SortOrder property determines how the different groups will be sorted. RadGrid by default applies Ascending sort order for that field. However, you can explicitly set Descending sort order using the SortOrder property of the relevant GridGroupByField object. To sort the different groups you can also use the sort button placed in the GroupPanel.
To sort the items in a group by a field different than the "group by" field, just click on e column header (as demonstrated in this online demo of the product). Note that the fields used in the group header item are irrelevant to the groups sorting.
I hope this helps
Regards,
Martin
the Telerik team
When you set your group by field, the GridGroupByField.SortOrder property determines how the different groups will be sorted. RadGrid by default applies Ascending sort order for that field. However, you can explicitly set Descending sort order using the SortOrder property of the relevant GridGroupByField object. To sort the different groups you can also use the sort button placed in the GroupPanel.
To sort the items in a group by a field different than the "group by" field, just click on e column header (as demonstrated in this online demo of the product). Note that the fields used in the group header item are irrelevant to the groups sorting.
I hope this helps
Regards,
Martin
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
Dario Zanelli
Top achievements
Rank 1
answered on 19 Jul 2010, 10:23 AM
Dear Martin,
probably I didn't explain my problem well.
I would like to sort the items of the RadGrid according to the aggregate function Average that I have calculated in the bold instruction.
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="Categoria" />
<telerik:GridGroupByField FieldName="RiskValue" Aggregate="Avg" HeaderText="Valore medio di rischio" />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="categoria" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
Is it possible?
Kind regards,
Dario Zanelli
probably I didn't explain my problem well.
I would like to sort the items of the RadGrid according to the aggregate function Average that I have calculated in the bold instruction.
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="Categoria" />
<telerik:GridGroupByField FieldName="RiskValue" Aggregate="Avg" HeaderText="Valore medio di rischio" />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="Category" HeaderText="categoria" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
Is it possible?
Kind regards,
Dario Zanelli
0
Hello Dario Zanelli,
As I stated in my previous post:
"Note that the fields used in the group header item are irrelevant to the groups sorting."
Based on the above I am afraid that sorting a grouped grid, based on an aggregate function value, displayed in the header item is not supported scenario.
Regards,
Martin
the Telerik team
As I stated in my previous post:
"Note that the fields used in the group header item are irrelevant to the groups sorting."
Based on the above I am afraid that sorting a grouped grid, based on an aggregate function value, displayed in the header item is not supported scenario.
Regards,
Martin
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
mctl87
Top achievements
Rank 1
answered on 09 May 2014, 07:47 AM
Did anything change since 2010? I would really like to have such feature in RadGrid even if it involves overriding/extending standard functionality.
After some research i also found this thread:
http://www.telerik.com/forums/about-reorder-by-sumfunction-value
But it seems that ASP NET AJAX RadGrid does not provide us with any object related to "GroupDescriptors" so if im not wrong, it's just not possible in ASP NET.
EDIT: Just found similiar thread so i should ask "since 2013"... :)
http://www.telerik.com/forums/possible-to-sort-by-aggregate-value-(descending)-when-grid-is-grouped-
After some research i also found this thread:
http://www.telerik.com/forums/about-reorder-by-sumfunction-value
But it seems that ASP NET AJAX RadGrid does not provide us with any object related to "GroupDescriptors" so if im not wrong, it's just not possible in ASP NET.
EDIT: Just found similiar thread so i should ask "since 2013"... :)
http://www.telerik.com/forums/possible-to-sort-by-aggregate-value-(descending)-when-grid-is-grouped-
0
Hi Michał,
Unfortunately the required functionality is still not supported in the RadGrid control and sorting a grouped grid, based on an aggregate function value, displayed in the header item is not supported scenario.
Excuse us for any inconvenience this limitation may lead.
Regards,
Maria Ilieva
Telerik
Unfortunately the required functionality is still not supported in the RadGrid control and sorting a grouped grid, based on an aggregate function value, displayed in the header item is not supported scenario.
Excuse us for any inconvenience this limitation may lead.
Regards,
Maria Ilieva
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Derek
Top achievements
Rank 1
answered on 16 Jan 2018, 02:58 PM
Hi Maria,
Have there been any updates that would allow this functionality to be used now? Thanks!
0
Hi Derek,
I am afraid this requirement is still not supported. You can cast your vote here:
https://feedback.telerik.com/Project/108/Feedback/Details/165036-group-sorting-by-totals-of-other-grouped-items
Regards,
Eyup
Progress Telerik
I am afraid this requirement is still not supported. You can cast your vote here:
https://feedback.telerik.com/Project/108/Feedback/Details/165036-group-sorting-by-totals-of-other-grouped-items
Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.