RI
Risath
April 24, 2008 07:04 AM UTC
Hi,
Hope this code may be useful to your problem
using Syncfusion.Schedule;
this.scheduleControl1.ItemChanging += new ScheduleAppointmentChangingEventHandler(scheduleControl1_ItemChanging);
private void scheduleControl1_ItemChanging(object sender, Syncfusion.Schedule.ScheduleAppointmentCancelEventArgs e)
{
if (e.Action == ItemAction.ItemDrag)
{
e.Cancel = true;
}
}
Risath
SA
Sachintha
April 25, 2008 04:38 AM UTC
Hi Risath,
It solves the problem only for the "month view", but in the "week view" still able to drag appointments.
Event does not fire in the "week view".
Is there a way to stop this behaviour ?
Thank you in advance.
AD
Administrator
Syncfusion Team
April 25, 2008 01:36 PM UTC
The event is raised for me for the week view (actually all views) in the samples shipped with the product, and the code that Risath posted prevented the drop from completing in the week view in that sample. In your project, are you somehow unsubscribing to the event or recreating the ScheduleControl as you change views?
If you can post a sample where this fails either here or in Direct Trac, we can try to debug it.
AD
Administrator
Syncfusion Team
April 25, 2008 02:25 PM UTC
One problem with using the event to ignore a drag is that the user does see the drag start, but when he goes to drop, the drop does not occur. We will add a an event (and maybe a global property too) that will prevent your user from starting a drag.
HO
hom
April 30, 2010 06:51 AM UTC
how to Stop ScheduleAppointment drag behaviour, the user like to Locked the item, not move to another date and then back to original date.
thanks.
HO
hom
April 30, 2010 07:35 AM UTC
Exception occur when D&D, if the source and target Date is the same date.