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

RadScheduleView Dragging Appointments within Schedule View Control

2 Answers 143 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Supreet
Top achievements
Rank 1
Supreet asked on 03 Aug 2011, 03:28 PM
Hi,
   Suppose I have an appointment which is recurring appointment, frequesncy is Weekly & DayOfWeekMask ="Monday"  Start time 10 Am
Now if I drag this appointment to a new day new, time within same week
How can I capture these new day & new Time?

Do I have to create a custom DragDrop Behavior based on default one to achieve this?
Or should be possible to capture the details on Appointment_Editing event?

I have gone through your online demos but it doesn't really help.

Any pointers in correct direction would really be appreciated.
Thanks & Regards
Supreet

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 08 Aug 2011, 11:32 AM
Hello Supreet,

I would suggest to create custom DragDropBehavior as explained here and override its Drop method:

public override void Drop(DragDropState state)
{
    var destinationSlot = state.DestinationSlots.FirstOrDefault() as DragDropSlot;
    var start = destinationSlot.Start;
    var end = destinationSlot.End;
    base.Drop(state);
}


All the best,
Yana
the Telerik team

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

0
Supreet
Top achievements
Rank 1
answered on 18 Sep 2011, 09:59 AM
Hi,
   I understand the usage of CustomDragandDrop Behavior. I am following the steps mentioned here
http://www.telerik.com/community/forums/silverlight/scheduleview/415886-drag-and-drop.aspx

The problem is I can't do this in XAML as done in sample project attached in above thread
<telerik:RadScheduleView.DragDropBehavior>
                <local:CustomDragDropBehavior x:Key="CustomDragDropBehavior" />
            </telerik:RadScheduleView.DragDropBehavior>

The reason is that I am using the scheduler in a Lightswitch project thus there are 2 different projects in my solution.
I can't get the namespace to the CustomDragDrop class by doing 
 <local:CustomDragDropBehavior x:Key="CustomDragDropBehavior" />

Is there a way I can hook DragDropBehavior via code?
& then call the overriden drop method from there?

Any help is appreciated.

Thanks & Regards
Supreet
Tags
ScheduleView
Asked by
Supreet
Top achievements
Rank 1
Answers by
Yana
Telerik team
Supreet
Top achievements
Rank 1
Share this question
or