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

Implement Recurrence functionality

2 Answers 47 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kuldeep
Top achievements
Rank 1
Kuldeep asked on 19 Jun 2013, 05:31 PM
Hi,

 
  I am using Radscheduler with WCF(View-Model binding).
 
  I want to implement custom recurrence functionality.
     -- Delete single recurrence appointment.
     --update single recurrence appointment.

  I want to confirm from your side .

 Please update.
 
 

2 Answers, 1 is accepted

Sort by
0
Kuldeep
Top achievements
Rank 1
answered on 19 Jun 2013, 05:37 PM
Hi ,

I have try some thing.

i have to update recurrenceRule and recurrence parentID.
I am getting recurrenceRule and recurrence parentID.
but i want to send some other information in appointment.

I have try some thing below code.
 

function OnClientRecurrenceActionDialogClosed(sender, args) {
                debugger;
                appointment = args.get_appointment();
                if (args.get_recurrenceAction() == 2 && args.get_editSeries() == false) {
                    resource = new Telerik.Web.UI.SchedulerResource();
                    resource.set_type("PhysicianID");
                    resource.set_key(parseInt(document.getElementById('ddlPhysicianID').value));
                    appointment.get_resources().add(resource);

                    resource = new Telerik.Web.UI.SchedulerResource();
                    resource.set_type("ClientRefID");
                    resource.set_key(parseInt(document.getElementById('ClientRefId').value));
                    appointment.get_resources().add(resource);

                    resource = new Telerik.Web.UI.SchedulerResource();
                    resource.set_type("UserID");
                    resource.set_key(parseInt(document.getElementById('hdnUserID').value));
                    appointment.get_resources().add(resource);

                    resource = new Telerik.Web.UI.SchedulerResource();
                    resource.set_type("RecurrenceStatus");
                    resource.set_key("DeleteSingleRecurrence");
                    appointment.get_resources().add(resource);

                    sender.deleteAppointment(appointment, false);
                }
                else if (args.get_recurrenceAction() == 2 && args.get_editSeries() == true) {
                    scheduler.deleteAppointment(appointment, true);
                }
                else if (args.get_recurrenceAction() == 1 && args.get_editSeries() == false) {
                    recurrenceStatus = "EditOnlyCurrentRecurrence";
                    scheduler.rebind();
                }
                // scheduler.rebind();
            }
     but  we are not getting above created run time resource value in updateAppointment service method.
     i am getting resource type but the value is null.
0
Boyan Dimitrov
Telerik team
answered on 24 Jun 2013, 12:30 PM
Hello,

I would like to clarify that if you want to modify/edit or insert appointment from the client-side please the associated RadScheduler methods as described in our online demo.

In other words below you may find a sample code that will update the current appointment and all resources added on the client side will be available in the service implementation.
//JavaScript

function OnClientRecurrenceActionDialogClosed(sender, args) {        
    appointment = args.get_appointment();
    var editSeries = args.get_editSeries();
    if (args.get_recurrenceAction() == 1 && args.get_editSeries() == false) {
        resource = new Telerik.Web.UI.SchedulerResource();
        resource.set_type("PhysicianID");
        resource.set_key("sample_key");
        appointment.get_resources().add(resource);
 
        resource = new Telerik.Web.UI.SchedulerResource();
        resource.set_type("ClientRefID");
        resource.set_key("sample_key");
        appointment.get_resources().add(resource);
 
        sender.updateAppointment(appointment, editSeries);
    }         
}

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Kuldeep
Top achievements
Rank 1
Answers by
Kuldeep
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or