# Prevent table from scrolling to the top

**URL:** <https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 7, 2021, 10:57am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657 "2021-09-07T10:57:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakned](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jakned](https://forum.inductiveautomation.com/u/jakned)\
**Post date:** [September 7, 2021, 10:57am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/1 "2021-09-07T10:57:29Z")

</div>

Hello everyone,

I am working on a project which requires working with tables and editing them. What I do is:

- run a query and populate the table
- run an update query to edit the data in the table
- refresh the binding “props.data”

If user scrolls down in the table and makes a change, then after refreshing the data binding the table scrolls all the way to the top. User has to go back to the position where he made the change.

Is there a way to prevent that from happening or can I make the table scroll to the position of selected row?

Thanks a lot  
Jakub

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 7, 2021, 11:46am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/2 "2021-09-07T11:46:26Z")

</div>

its not really possible, it requires js which isnt exposed in ignition (yet) there where some feautre requests about it but idk if its already done

---

<div class="post-metadata">

**Author:** ![jakned](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jakned](https://forum.inductiveautomation.com/u/jakned)\
**Post date:** [September 7, 2021, 6:55pm UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/3 "2021-09-07T18:55:09Z")

</div>

Well that is very unfortunate. Can you think of any way around it?

I was thinking not using refreshBinding after user edits a row. I might update only the edited row. If I know the index of the dictionary in the list I might run a SELECT for that row and then assign values returned as follows data[n] = {“row”:“items”}.

The thing is, that table will be edited and viewed by multiple users at the same time and they would not see edits by other users in the real time.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 8, 2021, 1:47am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/4 "2021-09-08T01:47:55Z")

</div>

Search the forum, here's one that may help,

> [@Scroll scrollbar to position via script](https://forum.inductiveautomation.com/t/scroll-scrollbar-to-position-via-script/15999):
>
> I've had a request from a customer to auto-scroll a template repeater to the previous scroll position as left at on the last page view. How would I go about doing this? Cheers!

I do this quite often, scroll to a specific row. Let me know if you need more help, I can send the code I use tomorrow.

Edit, failed to realize you are using perspective.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 8, 2021, 6:31am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/5 "2021-09-08T06:31:41Z")

</div>

yeah its similar in js but the fuction isnt exposed by ignition:/

---

<div class="post-metadata">

**Author:** ![jakned](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jakned](https://forum.inductiveautomation.com/u/jakned)\
**Post date:** [September 8, 2021, 9:35am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/6 "2021-09-08T09:35:48Z")

</div>

Yeah I was able to find a code that is used in Vision, nothing for Perspective so far.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 8, 2021, 11:15am UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/7 "2021-09-08T11:15:33Z")

</div>

you could make the table has no scroll and instead use pages i guess?

---

<div class="post-metadata">

**Author:** ![jakned](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jakned](https://forum.inductiveautomation.com/u/jakned)\
**Post date:** [September 8, 2021, 12:49pm UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/8 "2021-09-08T12:49:18Z")

</div>

Right no other solution so far i guess. Dissapointing

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 8, 2021, 1:01pm UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/9 "2021-09-08T13:01:07Z")

</div>

or you could create a component that does the js for you.  
if you are familiar with it its not that hard of a component id guess

---

<div class="post-metadata">

**Author:** ![jakned](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jakned](https://forum.inductiveautomation.com/u/jakned)\
**Post date:** [September 17, 2021, 2:15pm UTC](https://forum.inductiveautomation.com/t/prevent-table-from-scrolling-to-the-top/50657/10 "2021-09-17T14:15:28Z")

</div>

I found out that if I set virtualized property to false, then it stops scrolling away after refreshing.
