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

Odd drag and drop behavior with RadGridView

10 Answers 173 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike Maddux
Top achievements
Rank 1
Mike Maddux asked on 07 Jun 2010, 10:18 PM
We are using RadControls for Silverlight 4.

I have drag and drop set up and working between two RadGridViews.  My techniques are based on an example from the Telerik site, which can be found here: http://www.telerik.com/help/silverlight/gridview-drag-drop-scenario.html

The strange behavior that I'm referring to also occurs in the example, with a small modification: change the SelectionMode for the gridview to "Extended", which allows multiple rows to be selected only when the user is holding down the control key.

The behavior is a little hard to reproduce, but here is my best description.

It happens in the SOURCE grid, so it's a drag issue, not a drop issue.

1) Move the mouse pointer downward across rows in the gridview.  This must be done fairly rapidly.
2) While the mouse pointer is moving, click and hold the left mouse button.

The odd behavior is that multiple rows get selected as the mouse moves down (with the left button still depressed)

If you continue downard until you pass the bottom of the grid and then continue to drag all of the selected rows to the TARGET grid, all of the rows that got selected are drop into the new grid.

The problem is that the user didn't choose to drag more than one row.  He never held down the control key and selected multiple rows.  Instead a bunch of rows got selected that he dididn't want.

As I said, this behavior can be replicated in the example, if you first change the selection mode of the RadGridView to "Extended"

I hope you can suggest a workaround!

Thanks,

Mike Maddux

10 Answers, 1 is accepted

Sort by
0
Mike Maddux
Top achievements
Rank 1
answered on 07 Jun 2010, 11:48 PM
Sorry, I gave the wrong location for the example I followed...

It's here: http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid

I downloaded the code and built a project.  Then changed SelectionMode for the GridView to "Extended" to produce the weird behavior of dragging multiple rows when you only want one.
0
Milan
Telerik team
answered on 09 Jun 2010, 08:05 AM
Hello Mike Maddux,

We are aware of this issue and we will try to provide a fix with our upcoming Q2 release. Unfortunately there is no way to disable this behavior with our current binaries.


Best wishes,
Milan
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
Brian Henry
Top achievements
Rank 1
answered on 24 Jun 2010, 10:15 PM
I am also experiencing this problem.  I've noticed that if you click on the row once to selectet it and then click again to drag it, the problem does not exist.  This suggests to me that there may be a temporary hack we could employ until the fix comes out.  Any ideas?  Also, will this be fixed in the Q2 drop?  When will Q2 be released?

Thanks,
Brian
0
Brian Henry
Top achievements
Rank 1
answered on 24 Jun 2010, 11:56 PM
In my last post I mentioned that there must be a hack.  Here's the one I figured out:

private

 

void RadDragAndDropManager_OnDragQuery(object sender, DragDropQueryEventArgs e)

 

{

 

yourGrid.CanUserSelect = false; //this turns off selection

 

 

TreeViewDragCue cue = new TreeViewDragCue();

 

e.Options.DragCue = cue;

e.QueryResult =

true;
...

 

}

 

 

private void yourGrid_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)

 

{

yourGrid.CanUserSelect =

true;

 

}


It's a hack, but it works!


Brian

0
Alex Chinn
Top achievements
Rank 1
answered on 13 Oct 2010, 04:25 PM
Has this been fixed in Q2?
I'm using 2010.2.714.1040 and still getting this behaviour.
Thanks.
0
Milan
Telerik team
answered on 18 Oct 2010, 12:14 PM
Hi Alex Chinn,

This fix was introduced with out Q2 service Pack 2 release. Will it be convenient for you to upgrade to this release?


Kind regards,
Milan
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
Alex Chinn
Top achievements
Rank 1
answered on 19 Oct 2010, 08:17 PM
Yup that's fine.
Thanks.
0
NITESH
Top achievements
Rank 1
answered on 10 Apr 2012, 02:43 PM
Has this been fixed now?
Because I am using the 2011.1.530.1040 and still facing this issue.Kindly guide.
Thanks!
0
Alexander Kotchkin
Top achievements
Rank 1
answered on 27 Apr 2012, 06:47 PM
Have the same issue in 2012.1.326.1050. 
0
Nick
Telerik team
answered on 30 Apr 2012, 09:14 AM
Hi,

You cans set the DragElementAction to None.

Hope this helps! 

Regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Mike Maddux
Top achievements
Rank 1
Answers by
Mike Maddux
Top achievements
Rank 1
Milan
Telerik team
Brian Henry
Top achievements
Rank 1
Alex Chinn
Top achievements
Rank 1
NITESH
Top achievements
Rank 1
Alexander Kotchkin
Top achievements
Rank 1
Nick
Telerik team
Share this question
or