Sorting a Grouped grid by AggregateFunction

2 posts, 0 answers
  1. Martyn
    Martyn avatar
    18 posts
    Member since:
    Mar 2011

    Posted 27 Feb 2012 Link to this post

    Hi, I have a grid that is sorted by 2 columns ("Dealer", "Carline") , and in the first column sort I have an aggregate function that gives the sum of all "ProjOverspend" in the group title, what I'd like to do is have the list (Dealers) ordered by this number in Descending order, here's my Group/Sort descriptor code;

        <telerik:GroupDescriptor Member="DealerName">
                <telerik:SumFunction SourceField="ProjOverspend" Caption="Total Projected Overspend: " ResultFormatString="{}{0:C2}" FunctionName="AggProjOverspend"/>
        <telerik:GroupDescriptor Member="Carline" SortDirection="Ascending" />
        <telerik:SortDescriptor Member="AggProjOverspend" SortDirection="Descending" />

    I was hoping this would then sort the Top Level grouping by AggProjOverspend however this doesn't happen, there doesn't seem to be any sorting at all.

    I hope this is enough info to show what I mean.

    Hope you can help,

    Thanks :)
  2. Maya
    Maya avatar
    4062 posts

    Posted 27 Feb 2012 Link to this post

    Hello Martyn,

    Please take a look at this forum thread for a reference. 

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top