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

RadGridView Drag & Drop

1 Answer 526 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Idan
Top achievements
Rank 1
Idan asked on 25 Aug 2014, 08:10 AM
Hello,

I'm working on a WPF application with ListViews and a pretty complex drag & drop functionality that I made.
I've replaced the ListViews with RadGridViews to achieve data virtualization.
I would like to use the existing drag and drop functionality with the RadGridView, can you please give me some info on how it can be done?

I've tried attaching the appropriate event handlers but it doesn't seem to work :
private void radGridView_Loaded(object sender, RoutedEventArgs e)
        {
            initInnerPlaylistControl(sender as RadGridView);
        }
 
public void initInnerPlaylistControl(RadGridView itemsControl)
        {
            itemsControl.AllowDrop = true;
            itemsControl.PreviewMouseLeftButtonDown += Rad_OnPreviewMouseLeftButtonDown;
            itemsControl.Drop += Rad_Drop;
            itemsControl.MouseMove += Rad_OnMouseMove;
            itemsControl.PreviewMouseLeftButtonUp += itemsControl1_OnPreviewMouseLeftButtonUp;
            itemsControl.QueryContinueDrag += Database_OnPreviewQueryContinueDrag;
            //itemsControl.OnGiveFeedback += OnGiveFeedback;
        }


thanks,
Idan

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Aug 2014, 08:58 AM
Hello Idan,

As an example on how to perform drag and drop operations, you can check how the GridViewDragDropBehavior is implemented in our "Row Reorder" and "Tree to Grid Drag" WPF Demos. The second one illustrates how to drag and drop between different controls.

You can also check our online documentation on DragDropManager.


Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
DragAndDrop
Asked by
Idan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or