Refresh RadCalendar

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

    Posted 19 Oct 2017 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
    Ves avatar
    2926 posts

    Posted 24 Oct 2017 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,
    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
    68 posts
    Member since:
    Jul 2017

    Posted 24 Oct 2017 in reply to Ves Link to this post

    Reassigning the AppointmentsSource triggers a rebind.
Back to Top