Ordered data set based on user

I want the functionality of the .getRowsInViewOrder but instead of returning a integer with the list I would like it to return the dataset in that order.

bumping thread :thumb_left:

Try this:

tbl = event.source.parent.getComponent("Table")
a = tbl.getRowsInViewOrder()
b = system.dataset.toPyDataSet(tbl.data)

z = map(list,zip(a,b))
z.sort(key=lambda x: x[0])
sorted_data = [row[1] for row in z]

print str(sorted_data)
for row in sorted_data:
	#do whatever
	print([x for x in row])

Change your variable names to protect the guilty.