We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grand total sorting

Hi, I have this table


And I want to add a default descending sort on the "Gran total" column, is there any way to do it?

I've been reading the docs, but so far I haven't found anything that works.


3 Replies 1 reply marked as answer

AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team December 19, 2022 11:49 AM UTC

Hi Valeria,


Using ValueSortSettings, you can sort individual value field and its aggregated values in both ascending and descending order. Please refer the below code example.


Code example:

this.dataSourceSettings = {

      valueSortSettings: {

        headerText: 'Grand Total',

        headerDelimiter: '##',

        sortOrder: 'Descending',

      },

    };

 


Sample: https://stackblitz.com/edit/angular-fnwg76-eewrrj?file=app.component.ts,app.component.html


Output screenshot:


Also, please refer the following documentation for more details about “ValueSortSettings”.


Document: https://ej2.syncfusion.com/angular/documentation/pivotview/sorting/#value-sorting


Please let us know if you have any concerns.


Regards,

Angelin Faith Sheeba.


Marked as answer

VD Valeria de la Torre December 19, 2022 08:07 PM UTC

Thank you for your help, it worked wonderfully!!


Thank you so much Angelin!! 🙌



AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team December 20, 2022 06:07 AM UTC

Thanks for the update. Please contact us if you have any other queries. We are always happy to assist you.


Loader.
Live Chat Icon For mobile
Up arrow icon