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.
The reason is that moving between calendars is only supported when the connector (and settings) are such that adding and removing activities are allowed since implicitly that is what you are doing - removing from one calendar and adding to the other. In this case your appointment's itemssource is readonly (since its linq generated) so the drag operation is not allowed.
Ok so I got this issue resolved by first adding to a temp list and the ienumerable returns that filtered list. But I got a new problem, I should not allow the user to add new appointments in the calendar ("Click to add appointment"), but if i set the AllowAdd to false in the data manager, it does not let me drag an appointments to other work queueus .... in my case I should allow to drag appointments across calendars but not add new ones.
Please suggest how best to handle this.
Also I had another post added for timeslot presenter style. Please suggest a response .
Also, is there a DragPreview Event which i can use to check if an appointment can be dropped to a calendar or not ? I want the mouse pointer to change to indicate that the appointment cannot be dropped to a calendar .
I tried using the ActivityDragging, but that does not work very well for me.
hariharan019 said: Also, is there a DragPreview Event which i can use to check if an appointment can be dropped to a calendar or not ? I want the mouse pointer to change to indicate that the appointment cannot be dropped to a calendar .
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?
Thank You.