DHTMLX Docs & Samples Explorer

Index
dhtmlxDataView

## Moving by API

#### Moving

        view.moveUp(id)
        view.moveUp(id,step);

        view.moveDown(id)
        view.moveDown(id,step)

        view.moveTop(id)

        view.moveBottom(id)

    //move to the position
        view.move(id, index);
    //move to different view
        view.move(id, index, some_other_view);
        //or
        view.move(id, null, some_other_view);

    //move to different view and change ID
    //scenario can be necessary to prevent ID collision
        view.move(id, index, some_other_view, target_id);

ID of item is preserved while moving.

#### Copying

    //make a copy of element
       var new_id = view.copy(source_id);
    //make a copy at specific position
       var new_id = view.copy(source_id, index);
    //make a copy in different view
       var new_id = view.copy(source_id, index, some_other_view);
       //or
       var new_id = view.copy(source_id, null , some_other_view);

    //make a copy with defined ID
       view.copy(source_id, null, null, target_id);
       //or
       view.copy(source_id, index, null, target_id);
       //or
       view.copy(source_id, index, some_other_view, target_id);

method returns ID of copied item, which is auto-generated or can be specified as last parameter.