9 Answers, 1 is accepted
RadDragAndDropManager.SetAllowDrag(Schedule, false);
RadDragAndDropManager.SetAllowDrop(Schedule, false);
But it still looks like you can drag the appt. It creates a hovering image of the appt like it will allow you to drag & drop it (see image attached)
You need to create a custom drag-drop behavior and override the CanStartDrag() method, where you should return false:
http://www.telerik.com/help/silverlight/radscheduleview-features-draganddrop.html
Kind regards,
Valeri Hristov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Thanks that worked.
But the base class in documentation is incorrect. There is no ScheduleViewDragDropBehavior class. I had to use DefaultDragDropBehavior.
Here is my code in case anyone is trying to do the same thing:
public class ScheduleDragDropBehavior : DefaultDragDropBehavior
{
public override bool CanStartDrag(DragDropState state)
{
return false;
}
public override bool CanDrop(DragDropState state)
{
return false;
}
public override bool CanStartResize(DragDropState state)
{
return false;
}
public override bool CanResize(DragDropState state)
{
return false;
}
}
And the XAML is:
<
telerik:RadScheduleView.DragDropBehavior
>
<
local:ScheduleDragDropBehavior
/>
</
telerik:RadScheduleView.DragDropBehavior
>
We recently renamed the class, it seems that the documentation was not updated correctly. Thank you for the heads up, we will fix the article as soon as possible.
Regards,
Valeri Hristov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I am trying to do the same thing here. I have created a new class in my Silverlight project (as Martha has done) however the DefaultDragDropBehavior class is not available. I have added a reference to Telerik.Windows.Controls.ScheduleView. Am I missing a step here?
The DefaultDragDropBehavior class is renamed to ScheduleViewDragDropBehavior.
Hope this helps.
Regards,
Rosi
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I suggest you upgrade to the latest Q2 2011 SP1 version of the control. This should solve the issue.
Regards,
Rosi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>