I would like to hide the value when a row or column is collapsed, and only display the value when the row or column is all expanded.
Thanks.
Hello Tony,
Thank you for contacting us and sharing the screenshots.
We recommend using the customizeCell
API call to hide values when rows or columns are collapsed. Please check the following JSFiddle for illustration: https://jsfiddle.net/flexmonster/1zvdgLhe/. Feel free to customize the suggested approach for your use case.
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Hi,
I think the sample code is not work.
Can I check the collapse / expanded value to be false / true for header field?
then assign the cell value for value field?
Or any setting to disable auto calculation when row / column are collapsed (i.e. Not Auto Calculate.PNG)?
Thanks.
Best Regards,
Tony
Hello Tony,
Thank you for the response.
Kindly note that such behavior is not supported out of the box. However, it can be achieved using the customizeCell
API call. This method allows you to control which data will be in the cells. For example, you can hide the cell value using the cell.text
property:
cell.text = ""
To check if there are expands in columns or rows, you can use data.columns.length
and data.rows.length
properties. With this in mind, you can create your logic of hiding the values in cells.
We hope it helps. You are welcome to contact us in case other questions arise.
Kind regards,
Nadia