Nested TreeView Drag and Drop

3 posts, 0 answers
  1. Justin
    Justin avatar
    5 posts
    Member since:
    Jun 2011

    Posted 25 Aug 2011 Link to this post

    Hi,

    I have a treeview nested inside the item template of another treeview.

    I would like to be able to use the preview line default behavior for drop targeting in the inner treeview.

    I would like for the top level treeview to pass the previewdragended event down to the nested treeview, but only for certain payload types.

    Is there any way this can be done?

    Thank you,
    Justin
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 30 Aug 2011 Link to this post

    Hi Justin,

     Could you please elaborate more on your scenario so that we could advice you better? Having RadTreeView in the ItemTemplate of another RadTreeView is bad practice that could lead to various problems. Actually, this way you are defining RadTreeView in RadTreeViewItem. Isn't it possible to just use one RadtreeView with different templates for the different HierarChical levels if needed ? Probably, the behavior that you want could be achieved with custom D'N'D events of the RadDragAndDropManager but it could cost a lot of code.
    Thank you for your cooperation.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Justin
    Justin avatar
    5 posts
    Member since:
    Jun 2011

    Posted 30 Aug 2011 Link to this post

    Thank you Petar, you are probably right.  The first reason that I nested another treeview inside the treeviewitem was to change the orientation of the itemspanel inside the nested tree to horizontal.  I suppose I could just use a listbox or itemscontrol.

    Thank you for your help, I see your point about the code cost, will restructure.
Back to Top