DHTMLX Docs & Samples Explorer

setDragBehavior(mode)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxgrid_drag.js

set Drag-And-Drop behavior

  • mode - behavior name
    • child - the item is dropped as a child of the target item;
    • sibling - the item is dropped as a sibling of the target item; if drop occurs between the parent and the child elements, the item is moved on the parent level;
    • complex - the item is dropped as a sibling or a child depending on the position of the target item towards the landing; if drop occurs between the parent and the child elements, the item is moved on the parent level;
    • sibling-next - the item is dropped as a sibling of the target; if drop occurs between the parent and the child elements, the item is moved on the child level;
    • complex-next - the item is dropped as a sibling or a child depending on the position of the target item towards the landing; if drop occurs between the parent and the child elements, the item is moved on the child level.
   mygrid.setDragBehavior(sibling);

See also: setDragText