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

Question on Prevent Collapse raised in a previous ticket

Answered
Bill Kaper asked on October 10, 2023

Hi,
 
I was using the information in a previous ticket for another customer to try to implement the ability to fully expand a classic pivot table, fill in all the empty cells for the expanded measure rows, and then freeze it so it could not be collapsed again. https://www.flexmonster.com/question/prevent-collapse/
Here is a fiddle with what I'm trying to accomplish: https://jsfiddle.net/8vstLfdw/2/
As you can see, the example appears to work, though if I click around the label Austrailia in row 1, as I get toward the bottom edge, I can still collapse the row. 
Is there an alternative way to achieve the expand and prevent collapse functionality modeled here that is more reliable? 

(Update: Our Principal Engineer figured out a way to make the DIV tag completely fill in the space and prevent the click, but it still feels a bit hacky. The solution I'm showing in essence is an expanded and flattened pivot table that looks like a flat table but aggregates and allows drill-through like a pivot. I think there is real value in adding first-order support for this in your product roadmap as either a new pivot type or as an enhancement to the flat option)

Thank you,
Bill

4 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster October 10, 2023

Hello, Bill!

Thank you for your question.

Our team prepared a more reliable sample for preventing cell collapse. Instead of using the customizeCell function to override the cell click function, the pointer-events: none style was used to disable any left clicks for the rows members area:

.fm-rows-sheet {
  pointer-events: none !important;
}

In addition, you can use the customizeContextMenu function to remove the "Collapse" option from the context menu. 
You are welcome to check the JSFiddle example: https://jsfiddle.net/flexmonster/t3ruxvn9/ 

Please let us know if the provided solution works for you.

Best Regards,
Maksym

Public
Bill Kaper October 10, 2023

Thanks. We will take a look at this.  I did edit the ticket about an hour ago to note that Our Principal Engineer figured out a way to make the DIV tag completely fill in the space and prevent the click, but it still feels a bit hacky.
No matter which way we land on implementing this, the solution I'm showing in essence is an expanded and flattened pivot table that looks like a flat table but aggregates and allows drill-through like a pivot. I think there is real value in adding first-order support for this in your product roadmap as either a new pivot type or as an enhancement to the flat option. 

Thank you for your fast response!

-Bill

Public
Bill Kaper October 11, 2023

Your solution was far more elegant than what we came up with. Thank you for your help!

Public
Maksym Diachenko Maksym Diachenko Flexmonster October 12, 2023

Hello, Bill!

Thank you for your feedback.
We are glad to hear that the proposed solution for preventing collapse works for you. Our team added the flattened pivot view type to our backlog. We will notify you if there are any updates on this matter.
Feel free to contact us if any other questions arise.
 
Best Regards,
Maskym

Please login or Register to Submit Answer