void (final RadContainer container, final boolean isRow, final int cell, int targetCell) { if (targetCell >= cell && targetCell <= cell+2) { return; } FormLayout layout = (FormLayout) container.getLayout(); List<RadComponent> componentsToMove = new ArrayList<>(); FormSpec oldSpec = isRow ? layout.getRowSpec(cell+1) : layout.getColumnSpec(cell+1); for(RadComponent c: container.getComponents()) { if (c.getConstraints().getCell(isRow) == cell) { componentsToMove.add(c); container.removeComponent(c); } } int count = deleteGridCells(container, cell, isRow); int insertCell = (targetCell > cell) ? targetCell - count - 1 : targetCell; final boolean isBefore = targetCell < cell; int newIndex = insertGridCells(container, insertCell, isRow, isBefore, oldSpec); for(RadComponent c: componentsToMove) { c.getConstraints().setCell(isRow, newIndex); container.addComponent(c); } }