Touch Drag and Drop between Two Grid Views

2 posts, 0 answers
  1. Mansi Mansi
    Mansi Mansi avatar
    15 posts
    Member since:
    Apr 2010

    Posted 13 May 2015 Link to this post



        I have two Grid Views with drag and drop behavior. working perfect. 

         Gesture is enabled on both.

         However, When I try to use Touch (on Tablet)  to drag row from Grid1 to Grid2 is not working, What am I missing ? 


    Thank You

    Mansi Mansi 


  2. Dess
    Dess avatar
    1561 posts

    Posted 18 May 2015 Link to this post

    Hello Mansi,

    Thank you for writing.

    RadGridView drag and drop functionality should be handled differently when using gestures. You can override the RadGridView.OnPanGesture method and start the service when necessary. You can refer to our Extending RadGridView to Enable Row Drag and Drop Functionality blog post which is quite useful on this topic. As to the gestures support, you should start the RadDragDropService as follows:
    public class DragAndDropRadGrid : RadGridView
    protected override void OnPanGesture(PanGestureEventArgs args)
        GridCellElement cell = this.GridViewElement.ElementTree.GetElementAtPoint(args.Location) as GridCellElement;
        RadDragDropService dragDropService = this.GridViewElement.GetService<RadDragDropService>();
        if (args.IsBegin)
        if (dragDropService.State == RadServiceState.Working)
        if (args.IsEnd)
        args.Handled = true;
     //drag and drop implementation

    It would necessary to modify the service events a little bit as the DragInstance is actually the cell, not the row element.

    I hope this information helps. Should you have further questions, I would be glad to help.
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top