Refresh RadCalendar

3 posts, 0 answers
  1. Ian
    Ian avatar
    26 posts
    Member since:
    Jul 2017

    Posted 19 Oct Link to this post

    I have a subclass of RadCalender which has an additional collection of items, which I'm binding to the calendar using a custom cell.

    So, I have two issues...

    1. How do I asynchronously bind this additional collection to the calendar? (The data comes from a web service.)

    2. How do I reload the data when it's changed?

  2. Ves
    Admin
    Ves avatar
    2917 posts

    Posted 24 Oct Link to this post

    Hi Ian,

    You can find the task of asynchronous loading of items collections discussed in various threads out in the internet, e.g. this Stack Overflow thread. Onto the second question -- RadCalendar does not expose a method for full reload as it handles updates internally. In order to act on changes in your collection, you may consider using custom renderers, inheriting from the existing CalendarRenderer classes. You can then send messages to these renderers from your Xamarin Forms control using the Xamarin Forms MessagingCenter. Then, upon receiving these, you can invoke the corresponding native control's method: InvalidateUI on Windows, RebuildCalendar on Android and ReloadData on iOS.

    Best regards,
    Ves
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ian
    Ian avatar
    26 posts
    Member since:
    Jul 2017

    Posted 24 Oct in reply to Ves Link to this post

    Reassigning the AppointmentsSource triggers a rebind.
Back to Top