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
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.
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.
Thanks,
Brian
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
I'm using 2010.2.714.1040 and still getting this behaviour.
Thanks.
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
Thanks.
Because I am using the 2011.1.530.1040 and still facing this issue.Kindly guide.
Thanks!
You cans set the DragElementAction to None.
Hope this helps!
Nik
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>