Hi Flexmonster team
I am currently working on an issue where we only mark regular data-cells after a certain "state" they are in.
So if the value for given cell is changed we change the state of that cell.
The way we get that reference is from:
const cell: HTMLDivElement = _.last(this.container.querySelectorAll(div[data-r='${row}'][data-c='${column}']
));
The issue is that when I try to do so with subtotals and grandtotals it returns undefined and therefore we can't set a state on them.
Do you have any idea how to query on them?
sincerely
Line / Accobat
Hello,
Thank you for reaching out to us.
The behavior you are describing is expected when retrieving a cell element reference via querySelector
. Flexmonster uses the virtual grid to optimize the rendering process, which means that the cells are dynamically created and destroyed on scroll, so that only the visible part of the grid is rendered instead of all cells.
To reliably apply custom logic or styles to cells, we recommend using the customizeCell
API call, which allows for triggering a callback function every time a cell is rendered, ensuring that changes are applied consistently.
Please let us know if our recommendation helped you.
Best regards,
Maksym
Hi Maksym
Is it possible to add a styling "flag" on the isTotals (grand / subtotals) when the children "cells" updates.
Sincerely
Line
Hello Line,
Thank you for your questions.
When you mention that children cells update, do you mean that the data in the pivot changes through Flexmonster API calls, such as updateData
or setReport
? Or are you referring to the custom editing on the pivot grid that you mentioned in previous tickets, or perhaps something else?
Knowing these details will help us understand the behavior you want to target and suggest the most effective way to style totals based on children cells change. Also, a code example of this update scenario would be very helpful.
We are looking forward to hearing from you.
Best regards,
Maksym
Hello Line,
Hope you are doing well.
We are wondering if you could configure the conditional styling for updated total cells.
Please let us know if you need any further assistance.
Best regards,
Maksym