Initializes a new instance of the DragDropEventArgs class.
Namespace: MindFusion.Common.UI
File: EventArgs.js
JavaScript Copy Code |
---|
function DragDropEventArgs (dragItem, dropTarget) |
ListItem. The item, associated with the event.
Object. An object, containing data about the target of the operation.
The following code handles the dragDrop event of a ListView class. Event data is provided through the DragDropEventArgs class.
JavaScript Copy Code |
---|
var ui = MindFusion.UI; // Create a new ListView control. // Add event handler function listDragDrop(sender, args) var itemIndex = sender.items.indexOfItem(args.dragItem); if ((itemIndex < 5) && (refIndex > 5)) args.cancel = true; |