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

Disable the "drag & drop" of some appointment

5 Answers 331 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 08 Feb 2011, 07:37 AM
Hi!

I've a Scheduler view, which has custom appointments.

I need to have some of these appointment that aren't drag&dropable, depending of a value of one resource of the appointment.

My question is:
On which property of the xaml(in the datatemplate?) can I bind a value which indicate if the current appointment is drag&dropable?
OR
Is there a event in which I enter when I try to do the drag&drop? Where I can cancel if I want the change?

Thank you

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 11 Feb 2011, 01:06 PM
Hello Julien, 


In order to implement custom drag and drop behavior, you need to inherit the DefaultDragDropBehavior class. For more information about DragAndDrop in RadScheduleView, please refer to the following links:

I hope this helps.

Regards,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Julien
Top achievements
Rank 1
answered on 14 Feb 2011, 08:48 AM
Do you have an example of custom behavior? Can we only implement some methods and keep the default behavior for other?
0
George
Telerik team
answered on 17 Feb 2011, 02:17 PM
Hi Julien,

 
Please, refer to the following online example - http://demos.telerik.com/wpf/?ScheduleView/FirstLook. You need to implement your custom logic to drag and drop the appointments in the your custom behavior.

Regards,
George
the Telerik team
0
Michael
Top achievements
Rank 1
answered on 06 Jul 2012, 06:22 AM
I don't see any implementation of the ScheduleViewDragDropBehaviour in this example??

In particular I am wanting to implement behaviour that disables an appointment from being moved/dragged beyond a date set in the viewmodel of the IAppointment.

so i can get the current appointment from state.appointment, but how do i reference what time slots the appointment is being dragged over?
0
Yana
Telerik team
answered on 06 Jul 2012, 08:32 AM
Hi Michael,

The FirstLook example hast been changed, but you can check Drag and Drop example which demonstrates how custom DragDropBehavior can be implemented for RadScheduleView.

I would suggest to use CanDrop method in your case - it provides parameter of type DragDropState which contains all the needed information about the destination slots.

Hope this helps.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Julien
Top achievements
Rank 1
Answers by
George
Telerik team
Julien
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Yana
Telerik team
Share this question
or