Appointment tile changes not getting reflected on UI

4 posts, 0 answers
  1. Sanket
    Sanket avatar
    4 posts
    Member since:
    Jul 2013

    Posted 18 Jul 2013 Link to this post

    I have used custom appointment in my project and added a "VisitTime" time property in the appointment template. When I load my calendar for the first time the time reflects correctly in the Appointment tile but when I change the time in code for that appointment, the changes are not getting reflected properly in the appointment tile in UI. The "VisitTime" property is defined as below and is defined in the VisitAppointment class derived from appointment class of telerik.

     public DateTimeOffset VisitTime
            {
                get { return _visitTime; }
                set
                {
                    _visitTime = value;
                    OnPropertyChanged(() => VisitTime);
                }
            }

     I tried using Edit() and Commit() method which are provided by default from telerik in order to update the changes in the UI. I passed the modified appointments collection(i.e custom appointments derived from telerik Appointment class) in the Edit() method and then later on called Commit() but still the changes are not getting reflected until and unless I reload the calendar (i.e fetch data from database again and then create the appointments collection from scratch).

     Please help me out with the necessary things that you think I might have missed out.

     Thanks in advance.

  2. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 22 Jul 2013 Link to this post

    Hello Sanket,

    You should to use the Storage method of the AppointmentBase class in order to access the instance which owns the fields. You could find more information about the custom appointment here.

    Hope this helps.

    Regards,
    Ventzi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Sanket
    Sanket avatar
    4 posts
    Member since:
    Jul 2013

    Posted 23 Jul 2013 Link to this post


    Hello Ventzi,
                Thanx for the reply.
                I tried setiing value using storage method.Propery set worked fine while loading the calendar.But when I did changes to the time of the  appointment from the code,in the set I got invalid cast exception,"unable to cast Appointment to task" on the line
     var storage = this.Storage<Task>();

                Can you please help in that ?


  5. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 25 Jul 2013 Link to this post

    Hi Sanket,

    The exception says that the Task type is not of type Appointment. You need to inherit the Appointment or AppointmentBase class or implement the IAppointment interface. Here you could find an article with detailed explanation on how to achieve this goal.

    Regards,
    Ventzi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top