🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all hot features!
Get Free Trial

Move focus on a specific cell

Answered
Francesco asked on October 10, 2019

Hi,
if the pivot contains many lines it would be useful to have a function that allows user to move the focus ( eventually also the scrollbar) on a specific cell (without filtering the data). Is there a way to do that?
Regards
Francesco

6 answers

Public
Ian Sadovy Ian Sadovy Flexmonster October 10, 2019

Hello Francesco,
 
Thank you for writing.
As for the scrolling to the specific row, there is no special API call for that.
But you can use JavaScript methods to scroll the content for a specific amount of pixels.
Here is the sample: https://jsfiddle.net/flexmonster/tax4dboq/
 
Please let us know if it helps.
 
Regards,
Ian

Public
Massimo January 11, 2021

Hello Ian,
could you please confirm that the approach suggested above is also valid in case of virtual scroll feature enabled and, therefore, when the number of cells exceeds 500?
In my tests I am encountering some difficulties for which I’m asking you for feedback.
Thanks in advance

Public
Vera Didenko Vera Didenko Flexmonster January 12, 2021

Hello, Massimo,
 
Thank you for your question.
 
We have checked on our end, and scrolling programmatically seems to work fine when there are more than 500 cells.
However, we would like to kindly explain that calculating the exact number of pixels to scroll to a specific row may be tricky.
 
Could you please provide a bit more details on the difficulties you are encountering?
Please let us know if there are any questions that we could help you with.
 
Looking forward to your response.
 
Kind regards, 
Vera

Public
Massimo January 13, 2021

Hello Vera,

I tried to write an example on jsFiddle but I can’t easily reproduce my scenario.
Nonetheless, could you please provide me some guidelines or tips to calculate the exact number of pixels to scroll to a specific cell in this scenario?
Thanks in advance
Regards
 

Public
Vera Didenko Vera Didenko Flexmonster January 13, 2021

Hello, Massimo,
 
Thank you for your reply. 
 
We would like to mention that we have a JSFiddle example showing how to scroll to a certain row: https://jsfiddle.net/flexmonster/7jk8531b/.
Please see the following Support forum thread for details.
 
Could you please let us know if this is something that you are looking for?
 
Looking forward to your response.
 
Kind regards,
Vera

Public
Massimo January 14, 2021

Hello Vera,
your last example was very helpful in understanding how to implement scroll in our scenario.
Thanks,
Massimo

Please login or Register to Submit Answer