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

Hefty Bugs in DragAndDrop between two RadGridViews (ArrowCue)

6 Answers 124 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Paul Brause
Top achievements
Rank 1
Paul Brause asked on 11 Mar 2010, 09:24 AM

Hi,

I am currently testing how to use Drag and Drop between two RadGridViews.

But I am experiencing bugs in Q1 2010 for SIlverlight!

Both GridViews have AllowDrag and AllowDrop set to true.

When I start dragging from one grid to the other using an RadDragAndDropManager.GenerateArrowCue() the arrow is showing ok when I am moving in the source grid. As soon as I approach the destination grid the arrow is not extending smoothly, it suddenly begins to multiply as soon as the mouse enters the target grid until I release the mouse button I have hundreds of arrows on the screen because the arrows are not deleted when I am in the target area! When the drag and drop cursor is outside a grid it works fine, as soon as it enters the destination grid: boom!

This behavior is shown in the second of the attached pictures.

The next bug is that I can start my drag and drop action while I am on a vertical or horizontal scrollbar! Usually when you click on a scrollbar you expect the slider to move in a certain direction or that you can drag the slider to a specific position. When I have drag and drop enabled on my gridviews it shows the drag and drop arrowcue when I am manipulating the scrollbar sliders! This behaviour is shown on the first attached picture.

The third bug is that the gridview is automatically selecting new items when I drag and drop.

Example: My Grid has SelectionMode="Extended" turned on to allow me to select more than one item. I select 5 items and start dragging them to another gridview. From time to time as I start dragging in the source gridview the source gridview ads additional items to my selected items (because I hovered over them) so that I end up dragging more items than I originally selected into the destination grid.

All of these problems don't seem to appear when I use a VisualCue.

Greets Janni

6 Answers, 1 is accepted

Sort by
0
Vladislav
Telerik team
answered on 15 Mar 2010, 04:07 PM
Hi Paul Brause,

Unfortunately, I was not able to reproduce the issues described.
Can you please provide us with a sample project demonstrating them?

Any additional comment/reports are highly appreciated.

Best wishes,
Vladislav
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
Michael Storchmann
Top achievements
Rank 1
answered on 16 Mar 2010, 10:34 PM

I had a similar ArrowCue-Problem, but it is not a "hefty bug", it is art :-)

You can reproduce the multiple arrows with your own SL-Demo "Tree to Grid Drag".
Add to the "OnOrderDragQuery"-Method after "e.Options.Payload = selectedItems"
the following line:

e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();

This will reproduce the problem. I have looked at your (Telerik) source code
to find out the cause.

Every RadDragAndDropManager.GenerateArrowCue() generates a new object.
Referring to your documentation this usually happens in the OnDragQuery
(like in your modified Demo) event handler.

In the source code (not of the demo, I mean the source code of the controls) you
find in RadDragAndDropManager.cs the method "PositionArrow()". In this method
every call adds the ArrowCue-Object to the Grid. The "If...Children.Contains..." condition
do not consider the fact, that almost on every call Options.ArrowCue is a new object.
I found a method  "ResetEverything" which removes only the current ArrowCue-object
from the grid, not all.

Workaround: Call RadDragAndDropManager.GenerateArrowCue() only once per complete
drag-and-drop operation.

The "second bug" Paul described (drag-and-drop-starting-on-scrollbar-slider.jpg) is
probably caused by the fact, that he must set the AllowDrag-Property to the GridViewRow,
not to the GridView.

The "third bug" he reported is indeed a problem (for me too), but I am not sure if it
is a normal behavior or a real bug.The default behavior of the grid in the
SelectionMode="Extended" is to select the hovered item. But in "Drag-State" this
behavior is not very desirable.

Kind regards,
Michael

0
Vladislav
Telerik team
answered on 18 Mar 2010, 09:19 AM
Hello Michael Storchmann,

Thank you very much for your detailed explanations.
We are totally agree with you.

For the "third bug" - it is the normal behavior.
Any additional comments are highly appreciated.

Sincerely yours,
Vladislav
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
Rick Knicely
Top achievements
Rank 1
answered on 15 Apr 2010, 10:07 PM
Guys I was having the same problem.  An like Micheal said I was calling the GenerateArrowCue() but didn't realize it.

I was not checking "e.Options.Status == DragStatus.DropDestionationQuery" in the OnDropQuery event.  That fixed my problem.
0
Mike Maddux
Top achievements
Rank 1
answered on 30 Apr 2010, 09:41 PM
Where can I find a walk through or description or example of how to enable drag and drop between TWO RADGRIDVIEWS, not between and Tree control and a RadGridView.

Thanks!

Mike Maddux
0
Valentin.Stoychev
Telerik team
answered on 06 May 2010, 09:44 AM
Hi Mike Maddux,

there is no example for grag/drop between two gridviews, but it should be the same as between any two controls. Please use the one provided below and let us know if you hit any problems.

Kind regards,
Valentin.Stoychev
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.
Tags
DragAndDrop
Asked by
Paul Brause
Top achievements
Rank 1
Answers by
Vladislav
Telerik team
Michael Storchmann
Top achievements
Rank 1
Rick Knicely
Top achievements
Rank 1
Mike Maddux
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or