Need a special offer?Find out if your project fits.
+

How to set the default sort of all fields

Answered
Chern Yu Zi asked on July 4, 2024

Hi,

Is there a way to set the default sorting across all fields to be 'unsorted' without defining one by one for each field to be unsorted? (See: Initialinzing the Flexmonster with all rows and columns unsorted.)

I do not have access to what the column or row names will be at instantiation of the pivot table.

Thanks!

 

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster July 8, 2024

Hello,

Thank you for reaching out to us.

We recommend using the defaultHierarchySortName property of the Options Object. To set the default sorting order as "unsorted" for all the fields, you can use the following code:

report: {
...,
   options: {
     defaultHierarchySortName: "unsorted"
   }
}

You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/x5dnysq1/

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer