CreatingAppointment Event not working

2 posts, 0 answers
  1. Jean-Louis Lalonde
    Jean-Louis Lalonde avatar
    7 posts
    Member since:
    Jun 2010

    Posted 06 Mar 2012 Link to this post


    I've been trying to get the CreatingAppointment Event to work for a while now without any luck. 

    Here is my code

    <telerik:RadScheduleView x:Name="scheduler" Grid.Row="3" 
    AppointmentEdited="scheduler_AppointmentEdited" AppointmentDeleting="scheduler_AppointmentDeleting" 
    AppointmentsSource="{Binding EventList}">
            <scheduleView:WeekViewDefinition />
    <scheduleView:MonthViewDefinition />
    <scheduleView:TimelineViewDefinition DayStartTime="00:00" />

    <telerik:RadContextMenu.ContextMenu >
    <telerik:RadMenuItem Header="New Appointment..." Command="schedule:RadScheduleViewCommands.CreateAppointment"  />

    I've tried removing the events to see if the default commands would take effect, but no luck. The context menu appears, by clicking on the item never triggers the events. I've been thinking that it may be related to the control templates, but the examples I've been seeing don't include any templates.

    I must say at am at a loss.

    Thanks in advance for any help.
  2. Jean-Louis Lalonde
    Jean-Louis Lalonde avatar
    7 posts
    Member since:
    Jun 2010

    Posted 08 Mar 2012 Link to this post

    Ok, got it to work.

    When assigning an ObservableCollection to the AppointmentsSource property, you must absolutely instanciate it as follows:

    ObservableCollection<Appointment>      yourCollection;

    If you do the following:

    ObservableCollection<YouAppointmentClass>      yourCollection; 

    Where YouAppointmentClass inherits from Appointment, CreateAppointment will simply not work.

    It's a limitiation in Silverlight apparently, not Telerik.
Back to Top