I took the row reordering behavior class you guys wrote from your demo (gridview row redordering)) and i am actually using it to move rows from one grid to another. In doing so i came accross some aberent behavior. I simplified what i was doing by only using one grid and the behavior still exists.
specifically If:
specifically If:
- the grid is set to extended selection
- drag and drop a row from the near the top to near the bottom
- quickly move the mouse after the drop
a number of rows become selected even though you have released the left hand mouse button.
in fact the grid thinks the mouse button is still down and as you move the mouse up and down selects and unselects
I am incuding a sample page i made to demonstrate as well as snapshots of the behavior.
I can send the test project if you need.
i used
- BeginingDragEventArgs.vb
- DragStartedEventArgs.vb
- RowReorderBehavior.stylingproperties.vb
- RowReorderBehavior.vb
from the demo
<
UserControl
x:Class
=
"agTestBed3.MainPage"
xmlns:dragAndDrop
=
"clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
xmlns:d
=
"http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc
=
"http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable
=
"d"
d:DesignWidth
=
"640"
d:DesignHeight
=
"480"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
>
<
Grid
x:Name
=
"LayoutRoot"
>
<
telerik:RadGridView
Name
=
"RadGridView1"
SelectionMode
=
"Extended"
dragAndDrop:RadDragAndDropManager.AllowDrop
=
"True"
/>
</
Grid
>
</
UserControl
>
Imports
System.Windows.Data
Imports
Telerik.Windows.Controls
Imports
Telerik.Windows.Data
Imports
System.ComponentModel
Imports
System.Collections.ObjectModel
Imports
System.Runtime.CompilerServices
Partial
Public
Class
MainPage
Inherits
UserControl
Public
collStates
As
New
ObservableCollection(Of State)
Public
Sub
New
()
InitializeComponent()
collStates.Add(
New
State
With
{.IDState =
"0"
, .NameState =
"FL"
})
collStates.Add(
New
State
With
{.IDState =
"1"
, .NameState =
"GA"
})
collStates.Add(
New
State
With
{.IDState =
"2"
, .NameState =
"aa"
})
collStates.Add(
New
State
With
{.IDState =
"3"
, .NameState =
"bb"
})
collStates.Add(
New
State
With
{.IDState =
"4"
, .NameState =
"cc"
})
collStates.Add(
New
State
With
{.IDState =
"5"
, .NameState =
"dd"
})
collStates.Add(
New
State
With
{.IDState =
"6"
, .NameState =
"ee"
})
collStates.Add(
New
State
With
{.IDState =
"7"
, .NameState =
"ff"
})
RowReorderBehavior.SetIsEnabled(RadGridView1,
True
)
RadGridView1.ItemsSource = collStates
End
Sub
End
Class
Public
Class
State
Implements
INotifyPropertyChanged
Public
Event
PropertyChanged(
ByVal
sender
As
Object
,
ByVal
e
As
System.ComponentModel.PropertyChangedEventArgs)
Implements
System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Private
Sub
FirePropertyChanged(
ByVal
[property]
As
String
)
If
Not
String
.IsNullOrEmpty([property])
Then
RaiseEvent
PropertyChanged(
Me
,
New
PropertyChangedEventArgs([property]))
End
If
End
Sub
Public
Property
IDState()
As
String
Get
Return
_IDState
End
Get
Set
(
ByVal
value
As
String
)
_IDState = value
FirePropertyChanged(
"IDState"
)
End
Set
End
Property
Protected
_IDState
As
String
Public
Property
NameState()
As
String
Get
Return
_NameState
End
Get
Set
(
ByVal
value
As
String
)
_NameState = value
FirePropertyChanged(
"NameState"
)
End
Set
End
Property
Protected
_NameState
As
String
End
Class