I need to be able to move activities from one resource to another by dragging. I have set the AllowDragging Property to "AcrossResources", however I am not able to move an activity from one resource to another.
I looked up the help document and here is what I found:
However note that the underlying schedule data connector may impose limitations on whether an activity's resource calendar or resource can be changed or not, in which case regardless of what this property is set to, the underlying schedule data connector restriction will be effective.
However, it does not state what the limitations set by the custom objects are. Is there something we should take care of in the custom objects or in the proeprty mapping to allow this to happen.
Please Suggest.
Thank You,
Hariharan
This should be allowed as long as the connector supports having an activity added/remove since we are in essence removing an activity from one resource calendar and associating it with another. The sample I posted in response to one of your other posts has this working when bound to custom objects. If you still have an issue then please post a sample that demonstrates the issue you are having.
Please find attached a sample project where i am not able to drag activities across resources.
Is there a way for me to get target calendar Id in the activity Dragging Event ?
The dragging event is invoked before the drag operation has started so it is not known at that point what the target calendar/timeslot will be.
hmmm.. I need to be able to cancel an appointment being dragged across calendar based on certain attributes of the destination calendar. How best can i do it.
For example, when i am dragging appointment 1 from calendar 1 to calendar 2, i need to know that the target calendar is calendar 2 and if certains conditions fail, i should stop the user from dropping it in calendar 2.
Please Suggest. This is important for my business process.
There is no event raised during the drag that you can use so the best that you can do at the moment is to handle the ActivityChanging event and perform your validation there. The Activity of the event arguments is the activity being changed and its properties will contain the updated values which in the case of editing an activity such that it is moved to another calendar would mean the OwningCalendar and OwningCalendarId would have been changed. You can compare the values of those properties to the properties on the OriginalActivityData that is also provided in the event args. If that fails your validation you can set the e.Cancel to true.
Thank You.
hariharan019 said:I tried using the activity changing event and comparing the OriginalActivity and Activity from the event args, but I dont know if this is a bug with the control, event though the original activity has the old values, the data item of the original activity is updated with new values
hariharan019 said:e.cancel does not revert the changes to the date item. This leads to the mapped object and the activity not being in sync.
I tried using the activity changing event and comparing the OriginalActivity and Activity from the event args, but I dont know if this is a bug with the control, event though the original activity has the old values, the data item of the original activity is updated with new values and e.cancel does not revert the changes to the date item. This leads to the mapped object and the activity not being in sync.
Please Suggest a response ASAP.
You could handle the ActivityRemoving event and cancel it (i.e. set Cancel to true). If you're using recurrences then you should also handle the ActivityRecurrenceChooserDialogDisplaying event and set the ChooserAction to Cancel if the ChooserType is ChooseForDeletion since a prompt will be displayed when attempting to delete an occurrence of a recurring activity to know if the user intends to delete the occurrence or the entire series.
Also, I want users to drag activities across resources for which i have to set allow remove to true.But I do not want them to delete activities, by using the delete key. Is there a property that i can set to handle this?