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

How to know if a tile has been drag-dropped ?

1 Answer 63 Views
Panorama
This is a migrated thread and some comments may be shown as answers.
Mohsen
Top achievements
Rank 1
Mohsen asked on 13 Oct 2015, 05:57 AM

I have two groups in my radPanorama which both of them have about ten radTileElement.

When I drag one radTileElement in another position inside it's group then no event is fired, even if I drop it into another group no event is fired.

 

How to know if radTileElement is in drag state and how to know where and when it's dropped ?

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 13 Oct 2015, 12:58 PM
Hi Mohsen,

Thank you for writing.

You can subscribe the DragDropService object of your RadPanorama instance to the PreviewDropTarget and PreviewDragOver events. In the event handlers, you are going to receive the instance and hit target objects. Based on some condition you can cancel the operation if you need to:
public Form1()
{
    InitializeComponent();
 
    this.radPanorama1.PanoramaElement.DragDropService.PreviewDropTarget += DragDropService_PreviewDropTarget;
    this.radPanorama1.PanoramaElement.DragDropService.PreviewDragOver += DragDropService_PreviewDragOver;
}
 
private void DragDropService_PreviewDropTarget(object sender, Telerik.WinControls.PreviewDropTargetEventArgs e)
{
}
 
private void DragDropService_PreviewDragOver(object sender, Telerik.WinControls.RadDragOverEventArgs e)
{
    e.CanDrop = false;
}

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Panorama
Asked by
Mohsen
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or