Just posting this in case anyone finds it useful. It is a repeater that allows drag and drop reordering. One limitation (which you may be able to overcome) is if you have a table of data and allow the user to sort the columns, the drag and drop will no longer work.
I’m sure it’s obvious, but the reorderable repeater works beautifully until I place the whole thing inside of a dynamic panel (I’m mocking tab content). When I do that, I can drag and drop, but the math is off by about a factor of 2. What am I missing?
Any of the cases that rely on the y coordinate of the repeater could be affected, once that repeater is inside a dynamic pane. Once a widget gets moved inside a panel, the y coordinate changes—it’s calculated in reference to the dynamic panel, not in reference to the main canvas…
I modified the action in the OnDrag event… it’s the action that calculates the dropindex… previously, it was calculating where to drop it based on the y coordinate of the cursor, minus the y coordinate of the repeater, all divided by the height of the row. I changed it so that it’s also subtracting the y coordinate of the outer dynamic panel.