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

RadTreeView as DragCue

2 Answers 53 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
paul orsillo
Top achievements
Rank 1
paul orsillo asked on 25 Oct 2010, 07:34 PM
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 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 28 Oct 2010, 06:09 PM
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
0
paul orsillo
Top achievements
Rank 1
answered on 28 Oct 2010, 09:01 PM
Thank you Tina.

This is exactly what I needed and really quite simple. 

Paul
Tags
TreeView
Asked by
paul orsillo
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
paul orsillo
Top achievements
Rank 1
Share this question
or