# Move scroll bar in perspective table to the location of selected row

**URL:** <https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 29, 2021, 3:48pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452 "2021-09-29T15:48:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkhoshroo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pkhoshroo/32/26801_2.png) [@pkhoshroo](https://forum.inductiveautomation.com/u/pkhoshroo)\
**Post date:** [September 29, 2021, 3:48pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/1 "2021-09-29T15:48:41Z")

</div>

Hello everyone,

When I change the “SelectedRow” in the perspective table component, the scroll bar does not move to the selected row location. Below is the video. Any idea how this can be fixed? Thank you!

[https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/afe17065dd5b87e60f8106fdd7cd9785a3d7d697.mp4](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/afe17065dd5b87e60f8106fdd7cd9785a3d7d697.mp4)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 29, 2021, 4:33pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/2 "2021-09-29T16:33:46Z")

</div>

This isn't something you can directly do currently, though it's a feature on our backlog:

> [@\[Feature-789\] Perspective component extensibility](https://forum.inductiveautomation.com/t/feature-789-perspective-component-extensibility/29459/6):
>
> We would probably have to expose an internal like https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView via a scripting method - first on components directly, then for something like the table it would have to have an ability to pass a specific row ID or something similar. That’s a decent feature request, though - I’ll file an internal ticket slight_smile

---

<div class="post-metadata">

**Author:** ![pkhoshroo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pkhoshroo/32/26801_2.png) [@pkhoshroo](https://forum.inductiveautomation.com/u/pkhoshroo)\
**Post date:** [September 29, 2021, 4:40pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/3 "2021-09-29T16:40:23Z")

</div>

Thank you, Paul!

---

<div class="post-metadata">

**Author:** ![pkhoshroo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pkhoshroo/32/26801_2.png) [@pkhoshroo](https://forum.inductiveautomation.com/u/pkhoshroo)\
**Post date:** [September 29, 2021, 5:10pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/4 "2021-09-29T17:10:41Z")

</div>

If I want to do this indirectly, what would be the best method to do it? Should I use the Property change script on “SelectedRow”?  
Not sure how to command the scroll bar to move to the selected row location. Do we even have any command for the scroll bar itself? I know there is one for vision but could not find any for perspective.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 29, 2021, 7:23pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/5 "2021-09-29T19:23:08Z")

</div>

Nope, that’s exactly what I requested for. They need to expose the JavaScript function to scroll to position. It’s not possible to do now and there is no workaround like you can in Vision where you could manipulate the backend Java objects

---

<div class="post-metadata">

**Author:** ![pkhoshroo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pkhoshroo/32/26801_2.png) [@pkhoshroo](https://forum.inductiveautomation.com/u/pkhoshroo)\
**Post date:** [September 29, 2021, 7:53pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/6 "2021-09-29T19:53:46Z")

</div>

Thank you very much, Nick. Appreciate the information.

---

<div class="post-metadata">

**Author:** ![automator591](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@automator591](https://forum.inductiveautomation.com/u/automator591)\
**Post date:** [March 13, 2026, 6:20pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/7 "2026-03-13T18:20:50Z")

</div>

Has there been any progress on this issue? I need this incorporated into my project.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 13, 2026, 11:23pm UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/8 "2026-03-13T23:23:19Z")

</div>

No change on our internal ticket in the backlog since my last post.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 14, 2026, 4:30am UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/9 "2026-03-14T04:30:26Z")

</div>

You can use the Markdown component to inject JS to do this for the time being. [Perspective table cell question - #3 by victordcq](https://forum.inductiveautomation.com/t/perspective-table-cell-question/78112/3)

Note: the table should be set to non-virtualised for this to work properly

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [March 14, 2026, 5:50am UTC](https://forum.inductiveautomation.com/t/move-scroll-bar-in-perspective-table-to-the-location-of-selected-row/51452/10 "2026-03-14T05:50:18Z")

</div>

In the next version of Periscope, you'll be able to do this by calling `runJavaScript` from a script/message handler on the Table component.

```python
args = {
	'rowIndex': 10 # the row to scroll to
}

system.perspective.runJavaScriptAsync('''(rowIndex) => {	
	const { component } = perspective.context

  	const row = component.element?.querySelector(`[data-row-index="${rowIndex}"]`)
	row?.scrollIntoView({ block: 'center', behavior: 'smooth' })
}''', args)

```

Basically the `self` reference in the scripting frame will be detected, and the corresponding client `ComponentModel` will be exposed as `perspective.context.component` in your JavaScript function.

_...coming soon..._

> <https://github.com/mussonindustrial/embr/pull/464>
>
> Include \`view\` and \`component\` context information in \`runJavaScript\` calls.
