I am trying to prevent flexmonster from rendering empty cells in the space around the grid, and am running into some problems. It seems there used to be an option called ‘fitGridLines’ in earlier versions, but it is no longer available and I cannot find any alternatives/workarounds in the release notes or migration guides.
I found a forum question with an example of how to hide empty cells using the css below, however there is still lots of unnecessary white space and the empty cells are still selectable. Is there a better way to do this? Or alternatively, is there a way of sizing the rows and columns dynamically to fill the entire container?…
#fm-pivot-view .fm-grid-layout .fm-empty
border-color: transparent !important;
#fm-pivot-view .fm-grid-layout #fm-data-sheet
border-top-color: transparent !important;
Also, when using the above css, while the empty cells have no border they are still there and the user is still able to select them. I can see that there used to be an options parameter called ‘selectEmptyCells’, but again it looks like this has gone. I have tried to hook into the cellclick event to stop selection if the cell is empty, but I cannot access to the JS event object in the event handler so there seems to be no way of stopping the event from propagating. Is there another way of achieving this?
Thank you for posting your question here.
Yes, you are totally right, the CSS approach does not remove the empty cells from the grid and also does not prevent them from selecting.
In such case, we recommend creating Flexmonster Pivot instance with the appropriate width so there was no space for empty cells.
That is the only option for now.
Please let us know in case of any other question.
OK thank you for your advice 🙂