fires before the mouse button is pressed and the cursor is moved over a draggable item
context | object | the drag-n-drop context |
native_event | Event | an HTML event object |
boolean | returning false will prevent dragging of the element |
grida.attachEvent("onBeforeDrag", function(context, native_event){
context.html = "<div style='padding:8px;'>";
for (var i=0; i< context.source.length; i++){
context.html += context.from.getItem(context.source[i]).title + "<br>" ;
}
context.html += "</div>";
return true;
});
If you drag multiple items, the event will be called once for the entire batch of items.
The drag-and-drop context can have the following properties: