Check documentation for the latest version of dhtmlxSuite onBeforeDragIn DHTMLX Docs


fires before an item is dragged to another potential target

boolean onBeforeDragIn(object context,Event object ev);
contextobjectcontext object
evEvent objectnative event object
booleantrue - to trigger the default action, false - to block it


myList.attachEvent("onBeforeDragIn", function (context, ev){
    // your code here
    return true;

  • context.start - ID of an item, from which the dragging process was started
  • context.source - an array of dragged IDs (drag source)
  • - ID of the target item (drop target)
  • context.from - a list object to which the dragged item belongs
  • - a list object to which the drop target belongs
  • context.index - an index in the target list at which new item will be added

The event is blockable, returning false will block the default action.

Back to top