Tuesday, June 30, 2009

Disabling the Drag for Source Object

Take this scenario, I have the table, in that having list of names, As per business logic some names should not allow the drag and drop functionality.

For that have to use set_cancel method. According to the condition it will not allow the drag and drop.

Example

ddb=new $Ig.DragDropBehaviour();
ddb.get_events().addDragStartHandler(DragStartHandler);

function DragStartHandler(sender, args)
{
args.set_cancel(true);
return;
}