RadTreeView - Drop on empty nodes

6 posts, 0 answers
  1. Thomas
    Thomas avatar
    13 posts
    Member since:
    Feb 2008

    Posted 21 Dec 2010 Link to this post

    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.
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 23 Dec 2010 Link to this post

    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
  3. DevCraft banner
  4. Chad
    Chad avatar
    10 posts
    Member since:
    Oct 2010

    Posted 01 Mar 2011 Link to this post

    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.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 04 Mar 2011 Link to this post

    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!
  6. Chad
    Chad avatar
    10 posts
    Member since:
    Oct 2010

    Posted 04 Mar 2011 Link to this post

    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.
  7. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Mar 2011 Link to this post

    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!
Back to Top
DevCraft banner