Drag and Drop From Gridview to TreeView

4 posts, 1 answers
  1. bob thomash
    bob thomash avatar
    35 posts
    Member since:
    Oct 2009

    Posted 13 Nov 2009 Link to this post

    Now i m having problem with RadTreeView as i have binded dynamically with class TreeViewFolder but at debug time i m getting parent node only even though i drag and drop from RadGridView to child node . Also i m trying to load image along with dragcue but i m not getting the same. image is only building with color of arrow. I want to have different image valid image when user drag items to valid treeview node or else invalid image for invalid treeview node. Also please let me know how to retrieve the selected item name from the path.

    TreeView Looks Like

    Personal Folder {Parent Item}
         Inbox    {Child item}
         Outbox {Child item}
         Sent Items {Child item}
         Deleted Items {Child item}

    Please download Sample Application from below link:
    Bob Thomash
  2. Answer
    Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 18 Nov 2009 Link to this post

    Hello bob thomash,

    We replied to your previous ticket : 258590.
    I am pasting the reply here: 

    ----
    I have attached your modified project to this reply. There are comments in it with how it has been changed.

    Here is what I did, based on your post:
    Now i m having problem with RadTreeView as i have binded dynamically with class TreeViewFolder...
     - the tree view has been bound, using a hierarchical data template

    ...but at debug time i m getting parent node only even though i drag and drop from RadGridView to child node .
    - now you can drop objects in all folders
      
    Also i m trying to load image along with dragcue but i m not getting the same. image is only building with color of arrow.
    - an image has been added to the drag cue when dragging an employee, I have used the TreeViewDragCue

    I want to have different image valid image when user drag items to valid treeview node or else invalid image for invalid treeview node.
    an CanCotnainEmployees property has been added to your class and the drag cue is changed accordingly

     Also please let me know how to retrieve the selected item name from the path
    I am not sure which path you refer to here. In your project the Id property has been used as a path and an item is selected by this path.

    If i enable isDragandDrop property then i able to get RadTreeView item onDragInfo which drop my object as child node of that item which is not desired in my application.
    - When the IsDragDropEnabled property is used for the TreeView it will enable all DragDrop by default. The dropped items are automatically added as children of the collection that the item will use as ItemsSource.

    Regards,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. smith
    smith avatar
    54 posts
    Member since:
    Mar 2009

    Posted 21 Nov 2009 Link to this post

    HI

     I am using Treeview to GridView Drag and Drop ,
    While dropping I dont want to removbethe iteem from TreeView ,Now presently item is removed form the treeview then add to the grid
    how to solve this  issue..
  5. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 23 Nov 2009 Link to this post

    Hi smith,

    Please take a look at the following online discussion:
    http://www.telerik.com/community/forums/silverlight/treeview/drag-drop-not-deleting-the-dragged-object.aspx
      
    I hope that this will help you.
            
    Greetings,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top