# selectedRow changes on when dragging up in a table

**URL:** <https://forum.inductiveautomation.com/t/selectedrow-changes-on-when-dragging-up-in-a-table/3913>\
**Category:** Ignition\
**Created:** [January 25, 2012, 9:46pm UTC](https://forum.inductiveautomation.com/t/selectedrow-changes-on-when-dragging-up-in-a-table/3913 "2012-01-25T21:46:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [January 25, 2012, 9:46pm UTC](https://forum.inductiveautomation.com/t/selectedrow-changes-on-when-dragging-up-in-a-table/3913/1 "2012-01-25T21:46:23Z")

</div>

I have found that the property selectedRow does not change when I click and dragging down in a table. If i click and drag up in the table the property change does fire.

I am trying to fire of a script when the amount of selectedRows has changed.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 25, 2012, 10:01pm UTC](https://forum.inductiveautomation.com/t/selectedrow-changes-on-when-dragging-up-in-a-table/3913/2 "2012-01-25T22:01:52Z")

</div>

Right, the selectedRow property is the index of the first selected row so it doesn’t change when dragging down. So, you should run your script on all key pressed, mouse released and selectedRow property change.

Besides that you would have to create a dynamic property on the component called numSelectedRows that is an integer and bind it to the following expression:`runScript("system.gui.getWindow('WindowName').getComponentForPath('Root Container.Table').getSelectedRowCount()", 250)`and perform a propertyChange script on it.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 26, 2012, 12:11pm UTC](https://forum.inductiveautomation.com/t/selectedrow-changes-on-when-dragging-up-in-a-table/3913/3 "2012-01-26T12:11:24Z")

</div>

[quote=“Travis.Cox”]  
Besides that you would have to create a dynamic property on the component called numSelectedRows that is an integer and bind it to the following expression:`runScript("system.gui.getWindow('WindowName').getComponentForPath('Root Container.Table').getSelectedRowCount()", 250)`and perform a propertyChange script on it.[/quote]  
I gotta say, Travis, that’s just slick! 😃
