Creating Multiple Appointment Types

4 posts, 0 answers
  1. Mohammed
    Mohammed avatar
    5 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2012 Link to this post

    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
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 12 Dec 2012 Link to this post

    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.

  3. DevCraft banner
  4. Mohammed
    Mohammed avatar
    5 posts
    Member since:
    Jul 2012

    Posted 12 Dec 2012 Link to this post

    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.
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 17 Dec 2012 Link to this post

    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.

Back to Top