This is a migrated thread and some comments may be shown as answers.

RadTreeView - Drop on empty nodes

5 Answers 91 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 21 Dec 2010, 04:25 PM
Hi,

I encountered a problem with the RadTreeView in Silverlight 4.
Drag and drop works just create (even between two treeviews). The only thing that doesn't work at all is 
DROPPING  A NODE INSIDE AN EMPTY NODE (by empty I mean a node, that doesn't have child nodes)

I can drop nodes before and after empty nodes and I can drop nodes before, after and inside nodes that have child nodes. But I can not drop them on (inside) empty nodes. The drag tool-tip just never says "Drag in MyNodeName" 

Thanks in advance for your help.

5 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 23 Dec 2010, 12:52 PM
Hello Thomas,

I have prepared sample application demonstrating the desired functionality. Note that in order to drop into the treeNode, the Child Property collection must be initialized (in the sample Products).

Let me know if you have any further questions.

All the best,
Tsvyatko
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Chad
Top achievements
Rank 1
answered on 01 Mar 2011, 06:10 PM
Hello,

I have a silverlight 4 app with a RadTreeView.  Dragging one node into another node that doesn't have any children works on all test computers except one (Win XP, IE 8).

// load the tree
ObservableCollection<TreeItemViewModel> treeItems = new ObservableCollection<TreeItemViewModel>();
foreach (Location l in vLocations)
    treeItems.Add(new TreeItemViewModel(l));
  
// tree is bound to TreeItems property
TreeItems = treeItems;

public TreeItemViewModel(Location location) : this(location, null) { }
public TreeItemViewModel(Location location, TreeItemViewModel parent)
{
    this.Location = location;
    this.Parent = parent;
  
    // add place holder child
    this.Children = new ObservableCollection<TreeItemViewModel>();
    this.Children.Add(new TreeItemViewModel(null));
}


Any suggestions on figuring out the problem?  This test user's computer doesn't have any development tools on it.
0
Petar Mladenov
Telerik team
answered on 04 Mar 2011, 04:13 PM
Hello Chad,

This is very strange issue since Silverlight is platform independent. We are shooting in the dark but can ensure that both computers have one and the same Silverlight version installed ?

Regards,
Petar Mladenov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Chad
Top achievements
Rank 1
answered on 04 Mar 2011, 04:36 PM
Yes, it has the same silverlight version.  I know silverlight is supposed to be platform independent, but I have experienced different results with other controls too.  For example, the RadRibbonBar would not show the tabs (using ItemsSource binding) on this and another slow computer.  The fix was to wait until the ribbon bar was loaded before setting the property the ItemsSource was bound to.  Strange.
0
Petar Mladenov
Telerik team
answered on 07 Mar 2011, 04:54 PM
Hi Chad,

Could you please provide us a runnable sample so that we could investigate it in depth ( the drag'n'drop problem in XP)? This is a very interesting issue that we would like to solve.

Regards,
Petar Mladenov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
DragAndDrop
Asked by
Thomas
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Chad
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or