Freeze Grid scroll during Drag Drop

3 posts, 1 answers
  1. Mark
    Mark avatar
    155 posts
    Member since:
    Oct 2010

    Posted 21 Apr 2011 Link to this post

    I'm not sure if this is the better forum, but I'll start here unless directed to the GridView threads.  When a user initiates a drag and drop from a DataGrid, is it possible to freeze the grid at the current location so no scrolling takes place until the mouseup (i.e. drop).

    Thanks.
  2. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 22 Apr 2011 Link to this post

    Hi Mark,


    The scrolling behavior when performing drag and drop is enabled by default. Still you may disable it by setting the AutoBringIntoView property of the RadDragAndDropManager. A possible approach may be to set it to false on the DragQuery and enable it in the DropQuery:

    private void OnGridViewDragQuery(object sender, DragDropQueryEventArgs e)
    {
        var draggedItem = e.Options.Source;
        if (e.Options.Status == DragStatus.DragQuery)
        {      
                    ....
          RadDragAndDropManager.AutoBringIntoView = false;      
        }
    }

    Please let me know whether this approach corresponds to your requirements.

     

    All the best,
    Maya
    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. DevCraft banner
  4. Mark
    Mark avatar
    155 posts
    Member since:
    Oct 2010

    Posted 22 Apr 2011 Link to this post

    Perfect, thanks so much!
Back to Top