Hi everybody!
What I need to do is to be able to copy an appointment in the scheduler, using drag and drop.
I've created a very simple JS function to do that. It should make a copy of the dragged appointment and insert it in the scheduler, and by not calling the eventArgs.set_cancel(true) the initial appointment would be updated to the new timeslot:
The problem is that the resources of the appointment are not sent together with the appointment back to the server, and when I'm trying to access a resource in my custom provider:
I'm getting a NullReferenceException.
On the client side I've checked the properties of the appointment before inserting it and it does indeed hold the resources.
On the server however, the resources seem to disapperar, although the other properties are sent correctly.
How should I solve this problem?
Thanks,
Stefan
What I need to do is to be able to copy an appointment in the scheduler, using drag and drop.
I've created a very simple JS function to do that. It should make a copy of the dragged appointment and insert it in the scheduler, and by not calling the eventArgs.set_cancel(true) the initial appointment would be updated to the new timeslot:
| function RadScheduler_ClientAppointmentMoveEnd(sender, args) { |
| var Appointment = args.get_appointment(); |
| sender.insertAppointment(Appointment); |
| } |
The problem is that the resources of the appointment are not sent together with the appointment back to the server, and when I'm trying to access a resource in my custom provider:
| public override void Insert(RadScheduler owner, Appointment appointmentToInsert) |
| { |
| //some other code here |
| int TaskID = (int)appointmentToInsert.Resources.GetResourceByType("Task").Key; |
| } |
I'm getting a NullReferenceException.
On the client side I've checked the properties of the appointment before inserting it and it does indeed hold the resources.
On the server however, the resources seem to disapperar, although the other properties are sent correctly.
How should I solve this problem?
Thanks,
Stefan