RadTreeView as DragCue

3 posts, 0 answers
  1. paul orsillo
    paul orsillo avatar
    31 posts
    Member since:
    Jan 2010

    Posted 25 Oct 2010 Link to this post

    I have a RadTreeView bound to a datasource (ObservableCollection<MyType>). When a child is dragged I want to show  the child and its immediate parent hierarchy in the dragcue. This chain may be a few levels deep. 

    So for example if I select child c3 (with parent b3 who has parent a3) I would like the dragcue to show a treeview with 
    --a3
        -- b3
             -- c3

    This tree would actually be the same if I were to start by selecting a3 or b3. So in short I am dragging the entire local hierarchy.

    I have the radtreeview and data structure for the dragcue implemented and loaded into a content control. My problem is that the tree is collapsed even though I call ExpandAll() on the dragcue treeview. I am using a HierarchicalDataTemplate and the treeiview appears to know that it has children (there is a  drop down indicator indcating that there is another level).

    It looks like the RadTreeView wants to do the right thing but I am missing something. 

    Is what I am trying to do possible? 

    Thank you,

    Paul
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 28 Oct 2010 Link to this post

    Hi paul orsillo,

    You can use ContainerBindings to bind the IsExpanded property of the RadTreeViewItems inside the DragCue to an appropriate business property. Please have a look at the attched example illustrating a similar scenario and let us know if you need more info.

    All the best,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. paul orsillo
    paul orsillo avatar
    31 posts
    Member since:
    Jan 2010

    Posted 28 Oct 2010 Link to this post

    Thank you Tina.

    This is exactly what I needed and really quite simple. 

    Paul
Back to Top