# How to scroll to the highlighed row of the table

**URL:** <https://forum.inductiveautomation.com/t/how-to-scroll-to-the-highlighed-row-of-the-table/54039>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 13, 2021, 11:10am UTC](https://forum.inductiveautomation.com/t/how-to-scroll-to-the-highlighed-row-of-the-table/54039 "2021-12-13T11:10:25Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [December 14, 2021, 10:12am UTC](https://forum.inductiveautomation.com/t/how-to-scroll-to-the-highlighed-row-of-the-table/54039/9 "2021-12-14T10:12:07Z")

</div>

@victordcq @cmallonee@pascal.fragnoud ...I am getting output in the console as object wrapper as below while clicking on Row and only for highlighted row ...for an unhighlighted row, I am getting proper output means the only value of ID as 101...I want the same output for highlighted one also, how to achieve that?

```auto
<ObjectWrapper>: {u'style': {u'backgroundColor': u'#AAAAAA'}, u'value': u'101'}

```

using value, at last, I got proper output for a highlighted row but for an unhighlighted row, it's throwing below error

```auto
value=self.props.data[self.props.selection.selectedRow]['Id'].value

error........
unicode' object has no attribute 'value'

```

by clicking on a row, I need proper value for both highlighted and unhighlighted rows..plz help

Solved it ...Thanks!!

to highlight the row, I followed as given in this below link...

> [@Changing colour of row based off value in cell in perspective table](https://forum.inductiveautomation.com/t/changing-colour-of-row-based-off-value-in-cell-in-perspective-table/43587):
>
> Hi, I just want to change the colour of the rows in my table based off the values on one of the cells. I am unsure on how to go about this in perspective, any help is welcome.

Here, in below code I edited from ..

```auto
if str(row['Id'])== IdTxt:
			row_dict['Id] = {'value': row['Id'], 'style': {'backgroundColor': backgroundColor}}
			returned_rows.insert(0,row_dict)
			self.props.selection.selectedRow=-1
		else:
			row_dict['Id'] = row['Id']
                        returned_rows.append(row_dict)

```

To ..Final code

```auto
if str(row['Id'])==IdTxt:
			row_dict['Id'] = {'value': row['Id'], 'style': {'backgroundColor': backgroundColor}}
			returned_rows.insert(0,row_dict)
			self.props.selection.selectedRow=-1
		else:
			row_dict['Id'] = {'value': row['Id']}
                        returned_rows.append(row_dict)

```

Just added value in else condition that worked out for me and now getting proper ID value on both highlighted and unhighlighted rows..Hope this helps.

Thank you!

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-scroll-to-the-highlighed-row-of-the-table/54039)._
