RadGridView Drag & Drop

2 posts, 0 answers
  1. Idan
    Idan avatar
    1 posts
    Member since:
    Aug 2014

    Posted 25 Aug 2014 Link to this post


    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;

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 26 Aug 2014 Link to this post

    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.

    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.
Back to Top