Need the ability to control order of the columns in the pivoted view and not just in the flat view
Hello, Jason!
Thank you for reaching out to us.
Flexmonster has multiple sorting options in the pivot view:
Check out the JSFiddle example with both described sorting methods combined. Here, the "Category" members are sorted alphabetically, and values associated with the "Cars" member are sorted descendingly. Please note that you can only set sort order once for columns and rows.
You are welcome to write us if more questions arise.
Best Regards,
Maksym
Hello, Jason!
Hope you are doing well.
We are wondering if you had time to check the provided instructions for sorting the pivot table.
Please let us know if this information helped you.
Best Regards,
Maksym
Hi Maksym, thanks for the comment.
So what I am actually interested in is the order of the columns (not the values themselves). So in the pivoted view it appears that the columns seem to be sorted alphabetically but I have some use cases where I do not want the columns themselves ordered left to right alphabetically in pivot view but with a different order that I want to designate.
Is there a feature in flexmonster I can enable to allow that?
Hello, Jason!
Thank you for your reply.
Could you please provide us with more information and screenshots to help us better understand the desired sorting result? This would greatly help us to provide a more accurate response.
Looking forward to hearing from you.
Best Regards,
Maksym
I've attached a rough example (with dummy data) where I am pulling a field into the column section in the pivoted (shown here as the Entity Name) and I want to order the Entity Name column values in a custom way but as shown in the second screenshot I can only sort AZ/ZA.
Note: this is not a great example but the concept still stands of wanting the order of the values in the column section in a custom way besides AZ/ZA
Hello, Jason!
Thank you for providing more details.
Flexmonster allows programmatically setting the custom order for member columns using the sortingMethod
API call. This method uses the comparator function, similar to JavaScript's Array.prototype.sort() method. You are welcome to check the JSFiddle example: https://jsfiddle.net/flexmonster/c15n2ykj/
Please let us know if the suggested approach would work for you.
Best Regards,
Maksym
Hello, Jason!
We would like to additionally mention another method of configuring the custom sorting - using the sortOrder
property. This property should contain an array of all members in the desired order. Check out our documentation page for more information: https://www.flexmonster.com/doc/sorting/#define-sorting-in-array
Looking forward to hearing your feedback.
Best Regards,
Maksym
Hi, Jason!
Hope you are doing well.
Our team is wondering if you had time to test the suggested approaches for arranging the members in a custom order.
Looking forward to your response.
Best Regards,
Maksym
Hi, Jason!
Just checking in to ask if you have already tried the provided methods for custom sorting.
Please let us know if you found them helpful in achieving the desired functionality.
Best Regards,
Maksym