# Power Table drag and drop

**URL:** <https://forum.inductiveautomation.com/t/power-table-drag-and-drop/9128>\
**Category:** Ignition\
**Created:** [October 1, 2014, 2:41pm UTC](https://forum.inductiveautomation.com/t/power-table-drag-and-drop/9128 "2014-10-01T14:41:53Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![samngeru](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/samngeru/32/6007_2.png) [@samngeru](https://forum.inductiveautomation.com/u/samngeru)\
**Post date:** [November 5, 2020, 1:09pm UTC](https://forum.inductiveautomation.com/t/power-table-drag-and-drop/9128/14 "2020-11-05T13:09:05Z")

</div>

This allows a **single row** or **multiple rows** to be moved between the **same** table. Seems to work with multiple and single interval selection mode. Sorry for the list comprehensions. The try and except block are needed because of indexing issues when moving rows to the bottom of a dataset.

```auto
data = self.data

allRows = [[rowData.getValueAt(rowNdx, colNdx) for colNdx in range(rowData.columnCount)] for rowNdx in range(rowData.rowCount)]

try:
	self.data = system.dataset.deleteRows(self.data,rows)
	self.data = system.dataset.addRows(self.data, dropIndexLocation, allRows)
except:
	data = system.dataset.addRows(data, dropIndexLocation, allRows)
	data = system.dataset.deleteRows(data,rows)
	self.data = data

self.selectedRow = -1

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/power-table-drag-and-drop/9128)._
