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

Catch DragAndDrop Event from telerikScheduler:AppointmentDialogWindow

1 Answer 45 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Roquier Michael
Top achievements
Rank 1
Roquier Michael asked on 12 Oct 2009, 11:18 AM

Hi,

I wanted to manage 2 listBoxs with drag and drop functionnality in a AppointmentDialogWindow of sheduler.

 

So,i designed in a  ControlTemplate of AppointmentDialogWindow 2 listBox with drag and drop functionnality.

In the code behind, I declare  :

 
RadDragAndDropManager.AddDragQueryHandler(this,OnDragQuery);  
RadDragAndDropManager.AddDragInfoHandler(this, OnDragInfo);  
RadDragAndDropManager.AddDropQueryHandler(this, OnDropQuery);  
RadDragAndDropManager.AddDropInfoHandler(this, OnDropInfo);  
 

where “this” is the form contain the radSheduler.

The problem is the methodes “OnDragQuery”, “OnDragInfo”, “OnDropQuery” and “OnDropInfo” aren’t actived when I drag and drop a item.

 

How can i catch  eventDragAndDrop’s listBox  designed in  AppointmentDialogWindow  of a sheduler from the sheduler’s form?

 
Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 15 Oct 2009, 07:52 AM
Hi Roquier Michael,

Thank you for your interest in our controls.

To work everything as expected you have to find the instance of the dialog window and hook the events to this instance instead of the this object.

To do this I suggest you hook on the scheduler's LayoutUpdated event and execute the following code:
void scheduler_LayoutUpdated(object sender, EventArgs e)
     {
         if (System.Windows.Application.Current.Windows.Count > 1)
         {
             Window w = System.Windows.Application.Current.Windows[1];//the correct index of the window depn on your own application.   
             RadDragAndDropManager.AddDragQueryHandler(w, OnDragQuery);
             RadDragAndDropManager.AddDragInfoHandler(w, OnDragInfo);
             RadDragAndDropManager.AddDropQueryHandler(w, OnDropQuery);
             RadDragAndDropManager.AddDropInfoHandler(w, OnDropInfo);
         }   
     }

Hope this helps.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Carousel
Asked by
Roquier Michael
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or