Drag Drop on RadTreeListView

2 posts, 0 answers
  1. Vamsi
    Vamsi avatar
    5 posts
    Member since:
    Sep 2012

    Posted 15 Apr 2013 Link to this post

    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 :

    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
    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.
  2. Nick
    Nick avatar
    593 posts

    Posted 16 Apr 2013 Link to this post

    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! 

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top