Hi Patrick,
The observed behavior can be considered an issue and I have logged it on our
feedback portal, here:
FIX. RadListView - dragging an item from one list view to another can result in incorrect scrolling of the source list view when it is not necessary. I have also updated your
Telerik points. We will do our best to include the fix of the issue in the R1 2019 release. A possible workaround is to use the custom drag-drop service below:
public
partial
class
RadForm1 : Telerik.WinControls.UI.RadForm
{
public
RadForm1()
{
InitializeComponent();
this
.radListView1.AllowDragDrop =
true
;
this
.radListView2.AllowDragDrop =
true
;
this
.radListView1.ListViewElement.DragDropService =
new
CustomListViewDragDropService(
this
.radListView1.ListViewElement);
this
.radListView2.ListViewElement.DragDropService =
new
CustomListViewDragDropService(
this
.radListView2.ListViewElement);
}
}
public
class
CustomListViewDragDropService : ListViewDragDropService
{
public
CustomListViewDragDropService(RadListViewElement owner)
:
base
(owner)
{ }
protected
override
void
HandleMouseMove(Point mousePos)
{
int
? scroll =
null
;
SimpleListViewVisualItem item =
this
.DropTarget
as
SimpleListViewVisualItem;
if
(item !=
null
&& item.Data.Owner !=
this
.Owner)
{
scroll =
this
.Owner.ViewElement.VScrollBar.Value;
Point clientPos = item.Data.Owner.ViewElement.PointFromScreen(mousePos);
if
((clientPos.Y < 0 && item.Data.Owner.ViewElement.Orientation == Orientation.Vertical) ||
(clientPos.X < 0 && item.Data.Owner.ViewElement.Orientation == Orientation.Horizontal))
{
item.Data.Owner.ViewElement.Scroller.Scrollbar.PerformSmallDecrement(1);
}
else
if
((clientPos.Y > item.Data.Owner.Size.Height && item.Data.Owner.ViewElement.Orientation == Orientation.Vertical) ||
(clientPos.X > item.Data.Owner.Size.Width && item.Data.Owner.ViewElement.Orientation == Orientation.Horizontal))
{
item.Data.Owner.ViewElement.Scroller.Scrollbar.PerformSmallIncrement(1);
}
}
base
.HandleMouseMove(mousePos);
if
(scroll.HasValue)
{
this
.Owner.ViewElement.VScrollBar.Value = (
int
)scroll;
}
}
}
I hope this helps. Let me know if you need further assistance.
Regards,
Hristo
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.