You can set a drop position that specifies:
- How to place the drop marker concerning a target record.
- How to place the dragged record after dropping.
The values listed by the DropPosition enumeration are used to set the DragEventArgsBase.DropPosition and DropMarkerData.Position properties.
The image below shows a Drag-and-Drop operation that does not allow moving a node to another child collection; it means the DropPosition.Inside is not allowed:

Handle the DataViewBase.DragRecordOver event and specify the DragEventArgsBase.DropPosition property to set the required drop position. The following code sample demonstrates how to prohibit end-users from moving nodes to another node's child collection:
XAML |
<dxg:TreeListView AllowDragDrop="True" DragRecordOver="OnDragRecordOver" />
|
C# |
void OnDragRecordOver(object sender, DragRecordOverEventArgs e) {
if(e.DropPosition == DropPosition.Inside) {
e.DropPosition = e.DropPositionRelativeCoefficient > 0.5 ? DropPosition.After : DropPosition.Before;
e.Handled = true;
}
}
|
In the demonstrated code sample, the DragRecordOverEventArgs.DropPositionRelativeCoefficient property is used to determine the exact drop position.