I have a treeview that contains folders that can contain other folders and documents. The databinding is handled by a C# class that returns a dataview and it displays correctly. When I drag a folder or document to another folder, the source node appears after the destination node rather than beneath it. I need it to appear beneath. For example,
-Folder A
---Document X
-Folder B
---Folder C
When I drag X to B it winds up displaying like this:
-Folder A
-Folder B
---Folder C
-Document X
What I want is this:
-Folder A
-Folder B
---Folder C
---Document X
Here is my code:
The line "SourceNode.IsDecendentOf(DestNode)" seems to have no effect.
Thanks for your help. YOu guys are awesome.
-Folder A
---Document X
-Folder B
---Folder C
When I drag X to B it winds up displaying like this:
-Folder A
-Folder B
---Folder C
-Document X
What I want is this:
-Folder A
-Folder B
---Folder C
---Document X
Here is my code:
| SourceNode.Owner.Nodes.Remove(SourceNode); |
| if (DestNode.Level == 0) |
| { |
| DestNode.Nodes.Insert(0, SourceNode); |
| } |
| else |
| { |
| switch (e.DropPosition) |
| { |
| case RadTreeViewDropPosition.Over: |
| case RadTreeViewDropPosition.Below: |
| DestNode.InsertAfter(SourceNode); |
| SourceNode.IsDescendantOf(DestNode); |
| break; |
| case RadTreeViewDropPosition.Above: |
| DestNode.InsertBefore(SourceNode); |
| break; |
| } |
| } |
The line "SourceNode.IsDecendentOf(DestNode)" seems to have no effect.
Thanks for your help. YOu guys are awesome.