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

Drag/Drop mouse position

7 Answers 131 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chase Florell
Top achievements
Rank 1
Chase Florell asked on 26 Feb 2009, 11:39 PM
Is there a way to change the behavior of the drag and drop feature so that when you grab a row, the mouse does not align to the upper left hand corner of the drag piece?

I would MUCH prefer it if the mouse stayed in the location it was originally clicked so that the drag experience is much cleaner.

Thanks in advance.

7 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 04 Mar 2009, 09:33 AM
Hello Chase,

I'm afraid that currently such behavior is not supported due to the fact that the current implementation of drag-drop functionality depends on mouse pointer position, which should over the drop target element. However in the scenario in question mouse pointer always will be over the dragged row.

Best wishes,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Gary
Top achievements
Rank 1
answered on 13 Jan 2014, 03:30 PM
Can someone please tell me if this behavior has changed in the newest version?  This is the only post I've found on this subject.
0
Konstantin Dikov
Telerik team
answered on 16 Jan 2014, 09:41 AM
Hello Gary,

You could have a look at our online demo "Grid - Items Drag-and-drop" for the current behavior of the dragging functionality.

As you will notice, the top-left corner of the dragged item is rendered according to the current position of the mouse cursor when drag starts. Please have in mind that in order for the drag-and-drop functionality to work, the dragged element should not be under the mouse cursor and that is the main reason for the position of the dragged item.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Gary
Top achievements
Rank 1
answered on 16 Jan 2014, 01:36 PM
Hi Konstantin
When I try the D&D from that link to your sample, Either on ie 9 or Chrome, I don't see it.  If I place my mouse near the date and start dragging, the top left corner snaps to the mouse position.  I'd rather have it move the same, like dragging while the mouse is still on the date.
Not dragging the cell, but the row.

Gary
0
Konstantin Dikov
Telerik team
answered on 20 Jan 2014, 05:47 AM
Hi Gary,

Currently there is known issue with the latest Chrome version, but with IE 9 everything is working as expected on my end.

As for the cell dragging, please note that RadGrid does not have cell dragging functionality, but only row dragging. Also, as I have explained in my previous post, it is not possible to have the dragged div place under the mouse cursor, because this will break the drag and drop functionality.

Best Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Gary
Top achievements
Rank 1
answered on 21 Jan 2014, 01:38 PM
Hi Konstantin

I wasn't trying to drag a cell, I was dragging the entire row, but I wanted to grab it by the right side and not have it snap to the upper left edge.
I wish I could send you a picture.

Thanks.

Gary
0
Konstantin Dikov
Telerik team
answered on 24 Jan 2014, 04:19 PM
Hi Gary,

As was mentioned several times in this thread, the dragged row must be placed away from the mouse cursor in order for the Drag & Drop functionality to work. If the dragged row is bellow the mouse cursor, when the row is dropped, the dragged row element will be the target of the drop event, which is not acceptable behavior.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Chase Florell
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Gary
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or