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

Rad Scheduler: Drag and Drop issue.

2 Answers 107 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Madhan
Top achievements
Rank 1
Madhan asked on 24 Mar 2012, 03:21 PM
Hi,
In Rad Scheduler i don't want to drag and drop past appointments in a scheduler. How to disable drag and drop feature for past appointments.

Thanks,
Madhan

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Mar 2012, 05:50 AM
Hi Madhan,

Try the following JavaScript to disable drag and drop of past appointments in a RadScheduler.
ASPX:
<telerik:RadScheduler ID="RadScheduler1" runat="server" AllowInsert="true" DataDescriptionField="Description" DataEndField="End" OnClientAppointmentMoveStart="OnClientAppointmentMoveStart" DataKeyField="ID" StartInsertingInAdvancedForm="false" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurranceParentID" DataReminderField="Reminder" DataSourceID="SqlDataSource1" DataStartField="Start" DataSubjectField="Subject" EnableDescriptionField="True" >
</telerik:RadScheduler>
JS:
<script type="text/javascript">
 function OnClientAppointmentMoveStart(sender, args)
  {
   currentDate=new Date();
   if (args.get_appointment().get_start() < currentDate)
    {
     args.set_cancel(true);
    }
   else
    {
     args.set_cancel(false);
    }
  }
</script>

Thanks,
Princy.
0
Nicolaï
Top achievements
Rank 2
answered on 28 Jun 2012, 09:36 AM
Thx! Useful!
Tags
Scheduler
Asked by
Madhan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Nicolaï
Top achievements
Rank 2
Share this question
or