Update List based on Grid

I’ve got a Grid that has its items set with an ArrayList. I’ve enabled Drag and Drop. So if I want to update the list, do I iterate through GridListDataView or which one? And how would that look like?


Hi, I’ve enabled the drag and drop properly but I need the Items + their order for a separate problem. So I just want to know which is the correct way to get the grid items in order. :slightly_smiling_face:

The example uses an external in-memory list. This approach works perfectly and is Grid independent.

Okay I am phrasing it wrong, my bad. I just want to retrieve the grid items in their order and saw a bunch of different methods and don’t know which is the right one to save the grid items in an ArrayList in the same order as the grid items

:wave: Could you try this? ```grid.getDataProvider().fetch(grid.getDataCommunicator().buildQuery(0, Integer.MAX_VALUE)).collect(Collectors.toList());