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.
Moving repeater rows up/down
Populate one repeater values from another using drag and drop
Moving one repeater item to a different position in the list
Moving card animation - adding and subtracting cards from a grid
How to replace one image with another
Reordering and moving rows using repeaters
Sortable, Drag-and-Drop columns
Easy to understand. My big thank.
Ah that’s great, I see you added the ‘Delete’ option. Awesome thanks
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.
Not sure if that will completely solve the issue for you, or if there might be something else going on as well, but that would be a place to start.