Hi team
I've a serious problem with XamDataTree (v 11.1).
Basically I have 2 tree controls, very simple, that host same node type.
Tree 1:
<ig:XamDataTree x:Name="HierarchyNodesTree" ItemsSource="{Binding HierarchyNodes}" DisplayMemberPath="Value" NodeLineVisibility="Visible" IsDraggable="True" IsDropTarget="True" Style="{StaticResource ResourceKey=HierarchyTree}"> <ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="Node" TargetTypeName="HierarchyNode" DisplayMemberPath="Value" ></ig:NodeLayout> </ig:XamDataTree.GlobalNodeLayouts> </ig:XamDataTree>
Tree 2:
<ig:XamDataTree x:Name="UnassignedNodesTree" ItemsSource="{Binding UnassignedNodes}" DisplayMemberPath="Value" IsDraggable="True" Style="{StaticResource ResourceKey=HierarchyTree}"> <ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="Node" TargetTypeName="HierarchyNode" DisplayMemberPath="Value"></ig:NodeLayout> </ig:XamDataTree.GlobalNodeLayouts> </ig:XamDataTree>
The idea is to drag the items from Tree2 and drop to Tree1.
The problem is that sometimes (and it's not rare case!) the drapped item vanishes (completely disappears from Tree2, and is not added to Tree1).
This is happening when I drag root item to the deep node (deep level >2).
Appreciate any feedback
Hi Lukasz,
I created two XamDataTree controls with similar markups to what you posted and was unable to reproduce the behavior you're describing. I saw the node data transfer correctly from one tree to the next with no loss of data.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 11.1.20111.2113 in NetAdvantage for WPF 2011 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Sample can be found here.
Thx for the feedback!
Your sample showed me where was the problem.
The problem was that I used List<T> instead of ObservableCollection<T> for holding the collection.
I didn't notice that, because when List<T> was used, sometimes drag & drop worked fine, and sometimes items just dissappeared from the GUI (especially when dropping to the deep level).
Maybe if all the items disappeared at first place, then I would have noticed that I have something wrong in the code.
This guy: http://news.infragistics.com/forums/p/53047/275184.aspx
..seems to have exactly the same problem, and I guess he is not using ObservavleCollection as well.
Anyway, problem solved now. Thx again!
Your very welcome. I posted a response in the thread you linked pointing it towards this thread.
If you have any other questions let me know.