I have list of divs that are draggable. How can I get orders of this element? For exmle on button click?
Hello.
The DragAndDrop component has a Change event, but that only gives you the old and new index. If you keep track on page of all the changes the block returns, you can know all the list. Best if you need the position of everything at all times.
The other option is to use JavaScript and track the data-id attribute inside the list. This one may be trickier to implement, but will work fine.
Bind your list to the DragAndDrop component. It auto-updates the order. On button click, just use LocalList—it already has the new order. Try with this
Hi @Lukasz Kapron,
You can refer this below forum discussion. Hope it helps.
https://www.outsystems.com/forums/discussion/50005/drag-n-drop-list-iteration-and-refresh/
Thanks,
Sriyamini J
That link is about Traditional, the question is about ODC.