Occurs when row is dragged over TreeGrid space.
|e||Object||An event object which contains data about drag-drop operation|
The following objects are carried with this event:
- dragRow - the row(s) object that is(are) dragged
- dropPos - the position where dropped row will be placed. Here is a list of dropPos values:
- -1, row is placed to the end of tree hierarchy as a root row
- 0, row becomes a child of target row
- 1, row is placed above target row
- 2, row is placed below target row
- isDropAllowed - a Boolean value stating whether row is allowed to drop
- mousePos - the position of mouse cursor in page coordinates
- sourceTree - the name of the source TreeView from which row is dragged
- targetRow - the row object over which mouse cursor is currently positioned
- targetTree - the name of the target TreeView where row will be dropped
This event can be handled by creating a function in your application controller $scope and applying this function as value to an attribute in TreeGrid directive:
- drag-over attribute, or
- events attribute
The events attribute has a higher priority than the drag-over attribute. If both attributes are set, the value from events attribute is used.
For cancellation, simply return a false value in this event handler.
Supported in: v1.0.
Articles & Samples