---
title: "moveContainer Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.printarea.movecontainer.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# moveContainer Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- moveContainer(initialIndex:  number, destinationIndex:  number ) :  [Container](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.container.htm.md)

- Moves a channel container to a new position in the array of containers.
  
 - example
     - ```
    const containerIndex = 4;
    const destinationIndex = 3;
    
    // Load the editor.
    CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition)
        // If the editor has been successfully loaded.
        .then(function (editor) {
            // When we get the product.
            editor.getProduct().then(function (product) {
                // Move a container.
                product.currentSurface.printAreas[0].moveContainer(containerIndex, destinationIndex);
            })
        });
    ```

#### Parameters

    - ##### initialIndex: number 
  
        An index of the channel container to be moved (a value greater than two).
    - ##### destinationIndex: number 
  
        A new index of the container to be moved (a value greater than two).

#### Returns Container
 
    An instance of the moved container.
