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

Creating Multiple Appointment Types

3 Answers 83 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 1
Mohammed asked on 07 Dec 2012, 03:07 PM
I have a scenario in which I have to create/display/Edit three different custom appointment types, all them deriving from AppointmentBase. This requirement creates problem in creating an appointment by double clicking on the slot. Therefore I would like do something as follows,
  1. Disable double click. 
  2. Provide context menu to select the appointment type
  3. on user selection launch corresponding appointment type creation dialog.
  4. But when the user double clicks the existing appointment, I should get corresponding appointment types editing dialog

     I have tried the context menu and followed up with scheduleview.Create(IAppointment appt), but how do I launch Appointment creation dialog. And call scheduleview.Commit() when the users clicks OK and call schedule.Cancel() when user clicks cancel.

Any help would appreciated.

Thanks
Obaid

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Dec 2012, 10:05 AM
Hi Mohammed,

I am afraid that RadScheduleView does not support having different types of Appointments. AppointmentsSource property should be bound to a collection of objects of the same type. You could create a custom appointment and add a custom property where to save the appointment type.

Hope this works for you,

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mohammed
Top achievements
Rank 1
answered on 12 Dec 2012, 10:29 AM
May be I was not that clear in my question.
  1. I will derive Appt1, Appt2, Appt3 from IAppointment and add custom properties respectively.
  2. My Appointment source for RadScheduleView will have ObservableCollection<IAppointment>.
  3. Depending upon user selection I will create one of the appointment type may be using CreatNew method
  4. I have customized EditAppointmentDialogStyle to load customized view depending upon Appointment type.
  5. But I don't know how do I launch EditAppointmentDialog from the code.

In the decompiled code I see a call to

this.OpenAppointmentDialog(Occurrence.CreateMaster(@new), AppointmentViewMode.Add);

 but that is private method in ScheduleViewBase class.

In a nutshell I would like to control appointment creation logic.
0
Yana
Telerik team
answered on 17 Dec 2012, 12:15 PM
Hi Mohammed,

I am sorry for the misunderstanding.

You could use CreateAppointment and EditAppointment ScheduleView commands in order to show EditAppointmentDialog with code.  More information about them can be found here.


Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Mohammed
Top achievements
Rank 1
Answers by
Yana
Telerik team
Mohammed
Top achievements
Rank 1
Share this question
or