Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

How to set the default sort of all fields

Resolved
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!

 

4 answers

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

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster July 23, 2024

Hello,

Hope you are doing well.

We were wondering if you had a chance to check the suggested approach. Could you please confirm if it works for you?

Looking forward to hearing your feedback.

Kind regards,
Nadia

Public
Chern Yu Zi August 8, 2024

Hi Nadia, thanks this works.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 8, 2024

Hello,

Thank you for the feedback!

We are glad to hear that it works for you.

As always, do not hesitate to contact us if other questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer