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

Drag Drop on RadTreeListView

1 Answer 99 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Vamsi
Top achievements
Rank 1
Vamsi asked on 15 Apr 2013, 02:04 PM
Hi, 
 
My Project is on Silverlight with MVVM based on Caliburn.Micro Framework and RIA Services for Service Layer

Scenerio's I am trying to achieve
 1)  Drag and drop an item from RadGridView to RadTreeListView
 2)  Drag and Drop (reorder) items inside RadTreeListView
 3)  When ever I drop an item in the RadTreeListView, I have some business logic that i want to do.

I have looked at the following Examples :
http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid
http://www.telerik.com/community/forums/silverlight/drag-and-drop/drag-between-treelistview-and-treeview.aspx

I see that in Telerik sample code the drag and drop can only be achieved by writting custom behaviours( Example : TreeViewDragDropBehaviour)
As I am using RIAServices, the list I get back is an EntityCollection
But I am stuck with , when I try using the behaviour from Telerik sample code, It throws an exception saying EntityCollection cannot be casted to IList.

The below link talks about my scenerio
http://www.telerik.com/community/forums/silverlight/drag-and-drop/draganddrop-with-radtreeview-and-entitycollection.aspx
But I do not see any code snippet or Project attached to the solution and I think the solution is for a non MVVM implementation.

Your help is greatly appreciated.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 16 Apr 2013, 02:40 PM
Hello Vamsi,

You can easily modify the solution to utilize an AttachedBehavior as well. 

As to the invalid cast, the behaviors in our examples are created to be used in various scenarios and since almost any collection implements the IList interface, that's what we cast to. 

You can always modify them to use EntityCollection or any of its base classes.

Hope this helps! 

Regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TreeListView
Asked by
Vamsi
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or