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

Appointment Creation

2 Answers 96 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 23 Jul 2008, 11:56 AM
Hi,

When double clicking to create an appointment, I want the appointment to just appear without having to enter an appointment name or click the green tick box. Also, I dont want the facility to edit the appointment, just to be able to move it and delete it.

I'm using the scheduler as part of a weekly schedule, and the appointment text is retrieved from the database. The user shouldnt have the option to change this.

Is this possible?

Thanks,

2 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 24 Jul 2008, 07:17 AM
Hi Jonathan,

I suggest you hook on the client-side OnFormCreating event, stop the inserting and create new appointment with the RadScheduler method InsertAppointment(). Check out the sample code below:

protected void RadScheduler1_FormCreating(object sender, SchedulerFormCreatingEventArgs e)  
{  
   if (e.Mode == SchedulerFormMode.Insert)  
   {  
        e.Cancel = true;  
        e.Appointment.Subject = "test subject";  
        RadScheduler1.InsertAppointment(e.Appointment);  
    }  

To prevent the editing of the appointment, you can use client-side event OnClientAppointmentEditing and cancel the editing with the function set_cancel(true) like this:

<script type="text/javascript">     
   function OnClientAppointmentEditing(sender, eventArgs)  
   {  
        eventArgs.set_cancel(true);  
   }  
</script> 

Hope this helps.

All the best,
Yana
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jonathan
Top achievements
Rank 1
answered on 24 Jul 2008, 02:02 PM
Thanks Yana,

That worked perfectly
Tags
Scheduler
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Yana
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or