To disable Devexpress Node Movement while Drag Drop in C# and VB.NET you can use the following snippet.

Sample C#

private void treeList1_DragOver(object sender, DragEventArgs e) 
{
	e.Effect = DragDropEffects.None;
}

private void treeList1_CalcNodeDragImageIndex(object sender, CalcNodeDragImageIndexEventArgs e) 
{
	e.ImageIndex = -1;
}

Sample VB.NET

Private Sub treeList1_DragOver(ByVal sender As Object, ByVal e As DragEventArgs)
	e.Effect = DragDropEffects.None
End Sub

Private Sub treeList1_CalcNodeDragImageIndex(ByVal sender As Object, ByVal e As CalcNodeDragImageIndexEventArgs)
	e.ImageIndex = -1
End Sub

One thought on “How to disable Devexpress Node Movement while Drag Drop in C# and VB.NET”

Leave a Reply