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

Freeze Grid scroll during Drag Drop

2 Answers 108 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 21 Apr 2011, 10:37 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 22 Apr 2011, 10:21 AM
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
0
Mark
Top achievements
Rank 1
answered on 22 Apr 2011, 12:05 PM
Perfect, thanks so much!
Tags
DragAndDrop
Asked by
Mark
Top achievements
Rank 1
Answers by
Maya
Telerik team
Mark
Top achievements
Rank 1
Share this question
or