DragDrop within RadGridView

6 posts, 0 answers
  1. David
    David avatar
    19 posts
    Member since:
    Jun 2008

    Posted 24 Aug 2010 Link to this post

    I am looking for a drag and drop sample for that allows me to reoorder items within a single RadGridView. Many of the examples posted previously are outdated and raise exceptions. The version I am using is 2010.2.812.

    I have have tried to adapt the example given for silverlight here: http://www.telerik.com/help/silverlight/raddraganddrop-within-radgridview.html. The functionality is exactly what I am looking for, however I need a WPF version.

    Each item contained wihtin the collection bound to the RadGridView has a property, of type int, named Position. In addition to the above, where and how can I update the Position property of the items in the collection once the drop has occurred so that I can get these objects to persist their position change?
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 24 Aug 2010 Link to this post

    Hello David,

    We have an up-to-date example for Drag and Drop within RadGridView. Unfortunately it is not available online and you should start our Demos application locally to be able to view it. 


    Sincerely yours,
    Milan
    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. UI for WPF is Visual Studio 2017 Ready
  4. David
    David avatar
    19 posts
    Member since:
    Jun 2008

    Posted 24 Aug 2010 Link to this post

    Hi MIlan,

    I've checked the current demo and there is no example for Drag and Drop witthin a single gridview. Can you zip a version for WPF?
  5. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 24 Aug 2010 Link to this post

    Hello David,

    You can download our samples + binaries from here. Once you unpack the archive you will find a folder called Demos. Open ExamplesCS_WPF.sln and run it. Once the application is started navigate to GridView and you will find a sample called Reorder Rows.


    Kind regards,
    Milan
    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
  6. David
    David avatar
    19 posts
    Member since:
    Jun 2008

    Posted 24 Aug 2010 Link to this post

    HI there. I tried the sample that you referred to in your last post. However when I try to drag an item, I am getting the following exception. This is the similar exception that I have been receiving when I tried to execute the previous examples. It almost seems like a dll issue.

    at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.StartDragging() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 1083
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.TryStartDrag(IMouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 999
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnTrackedElementMouseMoveInternal(IMouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 949
       at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnCoverRectangleMouseMove(Object sender, MouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 860
       at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Telerik.Windows.Examples.GridView.App.Main() in T:\Development\Resources\RadControls_for_WPF35_2010_2_0812_TRIAL\Demos\Examples\GridView\obj\x86\Debug\App.g.cs:line 48
  7. David
    David avatar
    19 posts
    Member since:
    Jun 2008

    Posted 24 Aug 2010 Link to this post

    In the above post I had executed the reorder rows from the project level. Once I executed the demo from the solution level, the demo worked. Sorry about that.
Back to Top
UI for WPF is Visual Studio 2017 Ready