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

DragAndDrop between treeview and treelistview

9 Answers 90 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Cristina
Top achievements
Rank 1
Cristina asked on 08 Nov 2010, 04:26 PM
Hi, I'm trying to make an example of DragAndDrog between a RadTreeView and a RadTreeListView, but so far I've failed. You could send me some examples? Thank you very much

9 Answers, 1 is accepted

Sort by
0
Cristina
Top achievements
Rank 1
answered on 09 Nov 2010, 04:47 PM
Hi could put the full code example "Implement Drag and Drop Between TreeView and Other Controls." I'm trying to make it work but I could not. Thank you very much
0
Vlad
Telerik team
answered on 09 Nov 2010, 04:49 PM
Hi Cristina,

 Have you checked this demo?

All the best,
Vlad
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
Cristina
Top achievements
Rank 1
answered on 09 Nov 2010, 04:55 PM
Mr. Vlad've seen all the shows, and read all the manuals they have. But there is no concrete example of DragAndDrop between a TreeView and a TreeListView. I've also tried to run the example is "Implement Drag and Drop Between TreeView and Other Controls" Silverlight manual but I can not accomplish. The truth is no longer what else to do. I would greatly appreciate a prompt response.
0
Vlad
Telerik team
answered on 09 Nov 2010, 04:59 PM
Hi,

 I'm not sure what's the problem - can you post more info? Do you get any exceptions? Can you post the exact problematic code? 

Sincerely yours,
Vlad
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
Cristina
Top achievements
Rank 1
answered on 09 Nov 2010, 05:10 PM
Mr Vlad, the code I have is what appears in the Manual of Silverlight "How to: Implement Drag and Drop Between TreeView and Other Controls" (http://www.telerik.com/help/silverlight/radtreeview-how-to -implement-drag-and-drop-between-treeview-and-other-controls.html). And the error I get is the following: "object reference not set to an instance of an object
use the new keyword to create an object instance
check to determine if the object is null Before calling the method
get general help for this exception. "
Chances are you are doing something wrong or something is missing me, so it was my concern if you could send me a complete project with that code, as I've seen it done in some other opportunities, to be compared with the mine because the website is missing some things such as filling the TreeView and GridView.
Again, thank you very much
0
Vlad
Telerik team
answered on 09 Nov 2010, 05:11 PM
Hello,

 Can you post the stack trace of the exception? More info about your controls version will be helpful as well. 

Best wishes,
Vlad
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
Cristina
Top achievements
Rank 1
answered on 09 Nov 2010, 05:15 PM
Is this what I ask?

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  StackTrace:
       at SilverlightApplicationDrag_and_Drop.MainPage.RadGridView_OnDropInfo(Object sender, DragDropEventArgs e)
       at Telerik.Windows.Controls.DragDrop.DragDropEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
       at Telerik.Windows.RouteItem.InvokeHandler(RadRoutedEventArgs routedEventArgs)
       at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
       at Telerik.Windows.EventRoute.InvokeHandlers(Object source, RadRoutedEventArgs args)
       at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
       at Telerik.Windows.DependencyObjectExtensions.RaiseEvent(DependencyObject element, RadRoutedEventArgs e)
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.RaiseDropInfo()
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnDrop()
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnCoverRectangleMouseLeftButtonUpInternal()
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnCoverRectangleMouseLeftButtonUp(Object sender, EventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
  InnerException: 

I'm working with. Net 2010, Silverlight 4 and the latest version of Telerik controls.

Will there be any chance that you can publish the entire project?

Thanks
(Sorry for English. I have little knowledge of the language)
0
Vlad
Telerik team
answered on 09 Nov 2010, 05:21 PM
Hi,

 Can you check using the debugger what is null in this event handler (RadGridView_OnDropInfo)?

All the best,
Vlad
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
jnh999
Top achievements
Rank 1
answered on 17 Dec 2010, 12:33 AM
I have posted a sample project to demonstrate drag and dropbetween RadTreeListView and RadTreeView in Code Library. http://www.telerik.com/community/code-library/silverlight/draganddrop/drag-and-drop-between-radtreelistview-to-radtreeview.aspx.  This was my prototype for the app that I am working on.  Most of the drag and drop operation is handled internally by the RadDragAndDropManager and there are not much custom code in it.  Hope that helps.
Tags
DragAndDrop
Asked by
Cristina
Top achievements
Rank 1
Answers by
Cristina
Top achievements
Rank 1
Vlad
Telerik team
jnh999
Top achievements
Rank 1
Share this question
or