Hi,
I have a solution where a user drags data into my application, onto a RadListView. The user drops the data on top of a RadListViewItem representing the subject to added the data to. I have added code for detecting which item that was dropped on (from Telerik documentation), but it always returns null from GetElementAtPoint. I have tried other Points (screen, control, client), but it's allways null.
The RadListView is unbound, in DetailView mode and have an icon and two columns. I don't know if that makes any difference in how this is handled.
private
void
radListView1_DragDrop(
object
sender, DragEventArgs e)
{
Point point = radListView1.PointToClient(
new
Point(e.X, e.Y));
BaseListViewVisualItem droppedItem = radListView1.ElementTree.GetElementAtPoint(point)
as
BaseListViewVisualItem;
if
(droppedItem !=
null
)
{
ListViewDataItem item = droppedItem.Data;
// handle dropped data here
}
}
I am using Telerik version 2014.1.226.40.
Best regards
Thomas