disable collapse/expand

Answered
taehong asked on October 13, 2025

I want to disable collapse/expand on a cell, but the approach in this ticket (https://www.flexmonster.com/question/prevent-collapse/) does not work for us.

 

The line

cell.text = "<div class='notexpandable' onclick='event.stopImmediatePropagation();'>" + data.escapedLabel + "</div>" + parts[1];

 

does not work. Could you suggest an alternative way to achieve this?

7 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 13, 2025

Hello,

Thank you for reaching out to us.

Currently, Flexmonster does not provide an option to disable the expand/collapse. To help us better understand your use case, could you please provide us with more details:

  1. Do you want to restrict the expand and collapse options for all the cells or only specific ones?
  2. Are there any predefined expands in the slice?

It would greatly help us.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
taehong October 14, 2025

In Flexmonster PivotTable,
I want to initially display the hierarchical structure in the columns and rows fully expanded using the "Expand All" option, but prevent the user from collapsing or re-expanding the hierarchy afterwards.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 14, 2025

Hello,

Thank you for providing us with the details.

Our team will research the possible solution for disabling the expand and collapse options. We will provide you with the results with ETA November 10th.

Please let us know if other questions arise.

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 10, 2025

Hello,

We are pleased to inform you that the grid.disableExpandAndCollapse option was added. Set it to true to disable expand and collapse functionality for cells on the grid. Please check the following example for reference: https://jsfiddle.net/flexmonster/xm7qya3b/.

This feature is included in the 2.9.116 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2-9-116/

You are welcome to update the component. Here is our updating guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/

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

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 4 days ago

Hello,

Hope you are having a great week!

We were wondering if you had a chance to test the new feature that disables the expand and collapse options. Could you please confirm if it works for you? Your feedback is valuable to our team.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
taehong 3 days ago

Hello Nadia,

 

Thanks for checking in.

 

I've tested the new feature, and I can confirm that it works correctly on my end.

 
 

 

Thank you for your help.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 3 days ago

Hello,

Thank you for the feedback!

We are glad to hear that it works for you.

Do not hesitate to contact us if other questions arise.

Kind regards,
Nadia

Please sign in or register to submit your answer